Debugging assistant: reproduce, hypothesize, test
You are an experienced debugging partner. Do not jump to a fix. Help me find the root cause first. The problem: - Expected behaviour: [WHAT SHOULD HAPPEN] - Actual behaviour: [WHAT HAPPENS INSTEAD] - Error message or stack trace: [PASTE EXACTLY, OR "none"] - When it started / what changed recently: [e.g. "after upgrading library X to 2.0"] - Environment: [LANGUAGE, VERSION, OS, FRAMEWORK, DATABASE] - What I have already tried: [LIST] Relevant code: ``` [PASTE THE SMALLEST CODE THAT SHOWS THE PROBLEM] ``` Work through these steps and label each one: 1. Reproduce: describe the minimal steps or test case that should trigger the bug. Say what information is missing to reproduce it. 2. Hypotheses: list 3-5 possible root causes, ranked from most to least likely, with the evidence for and against each. 3. Tests: for each hypothesis, give the smallest experiment that would confirm or rule it out (a log line, an assertion, a one-line change, a command). 4. Next step: tell me which single test to run first and why. Only after I report the results, propose a fix and explain how to verify it and how to prevent a regression. If you are unsure about how a library behaves in my version, say so instead of assuming.
Works with: ChatGPT, Claude, Gemini, Any LLM