Back to Prompts
💻Coding📝 Text

Debug My Code Like a Senior Engineer

Find bugs, explain root causes, and suggest safe fixes for pasted code.

May 1, 2026

💡 Use Case

Useful for developers, students, and builders who need structured debugging help.

📋 The Prompt

Act as a senior software engineer reviewing a bug report. Here is my context:

Language/framework: [language/framework]
Expected behavior: [what should happen]
Actual behavior: [what happens]
Error message or logs: [paste logs]
Relevant code:
```[language]
[paste code]
```

Please provide:
- Most likely root cause
- 3 alternative hypotheses
- Minimal safe fix
- Improved version of the code
- Edge cases to test
- A short explanation I can send to my team
- Questions you need answered if the diagnosis is uncertain

Tags

codingdebuggingsoftwaredevelopercode-review

How to Use This Prompt

  1. 1Click the Copy Prompt button above to copy the text to your clipboard.
  2. 2Open your preferred AI tool — ChatGPT, Claude, Gemini, or any text AI.
  3. 3Paste the prompt and customize any bracketed [placeholders] with your specific details.
  4. 4Submit and enjoy the result! Iterate by refining your inputs.