Back to guide/Developer Tools

Debugging Workflow

Claude Code can read files, run commands, and check git history — this prompt uses all three capabilities in a structured debugging flow. Requiring verification via running a command ensures the fix actually works rather than just looking plausible.

claude-code-tutorialerrorOutputreproStepswhenItStarted
Edit View
Prompt
I'm hitting this error:

\`\`\`
{{errorOutput}}
\`\`\`

**Steps to reproduce:** {{reproSteps}}
**When it started:** {{whenItStarted}}

Debug this systematically:
1. Read the error and identify the failing file/line
2. Read that file and trace the execution path
3. Check recent git changes if relevant: run \`git diff {{branch}}\` or \`git log --oneline -10\`
4. Identify the root cause — not just the symptom
5. Propose a fix and explain why it solves the root cause
6. Apply the fix
7. Run {{verifyCommand}} to confirm it works

If the error has multiple possible causes, investigate each one. Do not guess — verify by reading the actual code.

Variables to customize

{{errorOutput}}{{reproSteps}}{{whenItStarted}}{{branch}}{{verifyCommand}}

Why this prompt works

Claude Code can read files, run commands, and check git history — this prompt uses all three capabilities in a structured debugging flow. Requiring verification via running a command ensures the fix actually works rather than just looking plausible.

Save this prompt to your library

Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.