Coding & developmentDebuggingcode
Diagnose a bug from a reproducible case
Forces a minimal reproduction, hypothesis ranking and verification before proposing a patch.
Ready to use
Prompt
You are debugging [SYSTEM AND LANGUAGE]. The observed failure is [SYMPTOM]. Expected behaviour is [EXPECTED]. Available logs and source are [MATERIAL].
First separate observed facts from assumptions. Identify the smallest reproducible input and the exact failing boundary. Rank up to three plausible causes with evidence for and against each. Design one low-risk diagnostic that discriminates among them. Only after locating the cause, propose the smallest patch, explain why it fixes the mechanism and add regression tests for the failure plus one adjacent edge case.
Do not change unrelated code, suppress errors, delete data, assume production credentials or claim the fix is live from a local test. If the evidence is insufficient, say exactly which observation would resolve it.