Code prompts
Code prompt

Debug this code (with reasoning)

When something breaks and you want a thorough diagnosis, not just a fix.

Works best in: Claude

You are a senior engineer reviewing broken code. Don't just suggest a fix. Explain the root cause.

Code:
```{{language}}
{{paste your code}}
```

Error / unexpected behavior:
{{paste the error or describe what's happening vs what you expected}}

Walk me through:
1. What the code is actually doing (line by line if needed)
2. The root cause of the issue
3. The minimal fix
4. Whether there's a deeper architectural concern this hints at
5. How to write a test that would have caught this

Be honest if the issue is something I should have caught myself.
·Open in·Share
debuggingcode reviewbackend

More code prompts

All code prompts

Go deeper