Cursor · Coding

Debugging

Give Agent the full error, let it read the browser's console and network activity, and use Debug mode for bugs you can't explain.

Debugging with Cursor

Move up only when you need to

Start with the cheapest method. A clear stack trace pasted into Agent solves many bugs in one go. If the cause isn't visible, Debug mode collects evidence from a real run. For frontend problems, the built-in browser lets the agent read the console and network activity itself.

A fix you can't explain isn't finished

Cursor's course warns about one failure more than any other here: accepting a fix you don't understand. A null check can silence an error while the bad data stays. Ask why the value was wrong, and whether the fix addresses the cause, then add a test that would have caught it.

Frequently asked
What is Debug mode in Cursor?

It's an Agent mode for hard bugs. Instead of fixing straight away, it forms hypotheses, adds log statements, asks you to reproduce the bug, and uses the results to make a targeted fix. It then removes the logging once you confirm the fix.

How do I give Cursor my terminal error?

Type @Terminals in the chat input to attach terminal output, or paste the full error. Include what you did to trigger it and what you expected to happen.

Why does a command behave differently when Cursor runs it?

Cursor's troubleshooting page says it sets CI=1 when Agent runs terminal commands, and this can change how some tools behave. You can run the command with unset CI first, or add a rule telling Agent to do so.

Can Cursor read browser console errors?

Yes. Agent's built-in browser can read console messages and monitor network requests, so you can ask it to open a page, reproduce a problem and report what it finds.