Back to guide/Developer Tools

Debugging with Claude Code

Forces Claude Code to read code before guessing, separates root cause from symptoms, and demands minimal-change fixes instead of rewrites.

claude-code-tipserror_messagetrigger_action
Edit View
Prompt
I'm seeing this error:

{{error_message}}

It happens when I {{trigger_action}}.

Debug this step by step:
1. Read the relevant source files around the error
2. Check if there are related tests that cover this path
3. Identify the root cause (not just the symptom)
4. Propose a fix with minimal changes
5. Verify the fix doesn't break related functionality

Do NOT guess — read the actual code before suggesting anything.

Variables to customize

{{error_message}}{{trigger_action}}

Why this prompt works

Forces Claude Code to read code before guessing, separates root cause from symptoms, and demands minimal-change fixes instead of rewrites.

Save this prompt to your library

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