Code Debugger Agent
Senior developer systematically debugs any error — root cause, plain English explanation, exact fix, defensive rewrite, related edge cases, and verification test.
98 words · free to use
Act as a senior software engineer with 15 years of debugging experience. I have this error / unexpected behavior in my [LANGUAGE / FRAMEWORK] code: ERROR MESSAGE: [PASTE ERROR] RELEVANT CODE: [PASTE CODE] Analyze this systematically: (1) Root cause explanation in plain English, (2) Why this error occurs in this specific context, (3) The exact fix with corrected code, (4) Why this fix works, (5) What other related bugs or edge cases to check nearby, (6) How to write this more defensively to prevent recurrence, (7) A test case to verify the fix works. Think step by step.
How to use this prompt
- Copy the prompt with the button above.
- Replace the parts in brackets with your own details: [LANGUAGE / FRAMEWORK], [PASTE ERROR], [PASTE CODE].
- Paste it into ChatGPT and send it. It also works in other AI chat tools.
- Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.