Agents
Cursor Debug Mode: Runtime Logs, Repro Steps & Targeted Fixes
By Learn Cursor teamUpdated
Debug Mode is an Agent workflow for stubborn bugs: the agent forms hypotheses, adds instrumentation that streams logs to a local debug server, asks you to reproduce the issue, reads runtime evidence, applies a small targeted fix and removes the instrumentation after you verify. Switch modes from the Agent mode picker or press Shift+Tab.
On this page
When should I use Debug Mode instead of normal Agent?
- Intermittent bugs where static reading of code is not enough.
- Regressions where behavior changed but the diff is unclear.
- Race conditions or environment-specific failures.
- Cases where the agent already guessed wrong fixes twice in the same chat.
What is the Debug Mode loop?
- 1Agent explores files and lists plausible root causes.
- 2Agent inserts logging routed to the Cursor debug extension.
- 3You reproduce the bug using the steps Agent provides.
- 4Agent reads collected logs and identifies the actual failure.
- 5Agent ships a minimal fix aligned to the evidence.
- 6You repro again; Agent strips instrumentation once confirmed.
How do I get better results in Debug Mode?
- Paste stack traces, error strings and exact repro steps up front.
- State expected vs actual behavior in plain language.
- Follow reproduction steps precisely so logs match the failure.
- Re-run repro twice if the bug is flaky before asking for a fix.
Frequently asked questions
Does Debug Mode leave log statements in my repo?
It should not. Verification includes removing instrumentation after the fix is confirmed. Review the diff before merge like any agent edit.
Can Debug Mode run commands automatically?
Yes, subject to your auto-run and approval settings. Keep approvals on for commands that mutate data or deploy.
How do I switch out of Debug Mode?
Use the mode picker in Agent or Shift+Tab to cycle modes.
Sources & last verified
Cursor ships frequently. Facts verified against primary sources on June 24, 2026.