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.
-
How Do You Debug Frontend Bugs With Cursor's Browser? Ask Agent to open the page in its built-in browser, reproduce the problem, and read the console and network activity itself. Level 2: ContextAgent's browser
- Navigate, click, type
- Screenshots
- Console outputwritten to files Agent can grep
- Network trafficin the Agent panel only
- Saved statecookies and storage persist per workspace
-
What Should You Give Cursor to Fix a Bug? Paste the full error or stack trace, say exactly when it happens, state what should happen instead, and ask for the root cause before the fix. Level 2: Context
- Errorwhere it failed
- Triggerwhen it happens
- Expectedwhat should happen instead
- Root cause firstbefore any fix
-
When Should You Use Debug Mode in Cursor? Use Debug mode when you can reproduce a bug but can't explain it, or when normal Agent keeps offering fixes that don't work. Level 2: Context
- 1Hypothesize
- 2Add logs
- 3You reproduce
- 4Analyze logs
- 5Targeted fix
- 6Verify, clean up
Then repeat
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.
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.