Back to guide/Developer Tools

Bug Fix with Context

The reproduction steps and entry point let Cursor trace the exact execution path. Showing the diff before applying prevents accidental changes in Agent mode.

cursor-ai-tipsbug_descriptionstep_1step_2
Edit View
Prompt
There's a bug: {{bug_description}}

Steps to reproduce:
1. {{step_1}}
2. {{step_2}}
3. {{step_3}}

Expected: {{expected_behavior}}
Actual: {{actual_behavior}}

Investigate by:
1. Read the relevant files starting from @{{entry_point}}
2. Trace the execution path that leads to this behavior
3. Identify the root cause (show me the exact line)
4. Propose the minimal fix
5. Check if the same bug pattern exists elsewhere in the codebase

Apply the fix only after I confirm. Show me the diff first.

Variables to customize

{{bug_description}}{{step_1}}{{step_2}}{{step_3}}{{expected_behavior}}{{actual_behavior}}{{entry_point}}

Why this prompt works

The reproduction steps and entry point let Cursor trace the exact execution path. Showing the diff before applying prevents accidental changes in Agent mode.

Save this prompt to your library

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