Back to guide/Developer Tools

Debug Investigation

Claude Code excels here — it can read files, check git log, run tests, and apply fixes autonomously. In Cursor, this works well in Agent mode where it can navigate the codebase. The step-by-step structure keeps both tools methodical.

cursor-vs-claude-codebug_descriptionreproduction_stepsexpected_behavior
Edit View
Prompt
Investigate and fix this bug: {{bug_description}}

Steps to reproduce: {{reproduction_steps}}
Expected behavior: {{expected_behavior}}
Actual behavior: {{actual_behavior}}

Investigation approach:
1. Read the relevant source files to understand the current implementation
2. Trace the data flow from the entry point ({{entry_point}}) through to where it fails
3. Check for recent changes in git history that might have introduced this
4. Identify the root cause (not just the symptom)
5. Propose a fix with the minimal number of changes needed
6. Verify the fix doesn't break related functionality

Before implementing the fix, explain:
- What the root cause is
- Why the current code fails
- What your fix changes and why
- Any edge cases your fix handles that the original didn't

Then implement the fix and run {{test_command}} to verify.

Variables to customize

{{bug_description}}{{reproduction_steps}}{{expected_behavior}}{{actual_behavior}}{{entry_point}}{{test_command}}

Why this prompt works

Claude Code excels here — it can read files, check git log, run tests, and apply fixes autonomously. In Cursor, this works well in Agent mode where it can navigate the codebase. The step-by-step structure keeps both tools methodical.

Save this prompt to your library

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