Cursor just deleted half your file. Or it suggested code that broke everything. Or it worked perfectly and you want to know why.
Either way, you need the logs. Here's where to find them.
The Quick Answer
Cursor AI logs are stored in:
macOS: ~/Library/Application Support/Cursor/logs/
Windows: %APPDATA%\Cursor\logs\
Linux: ~/.config/Cursor/logs/
But finding the logs is just the beginning. Making sense of them is the real challenge.
Understanding Cursor's Log Structure
Cursor generates several types of logs:
1. Main Application Logs
- •
main.log- Core Cursor application events - •
renderer.log- UI-related events - •
exthost.log- Extension host activities
2. AI-Specific Logs
- •Stored within the extension logs
- •Contains prompts sent to the AI
- •Includes responses and token usage
3. Crash Logs
- •Generated when Cursor crashes
- •Useful for bug reports
- •Found in the
crashes/subdirectory
How to Access Cursor Logs
Method 1: Via Cursor UI
- •Open Command Palette (Cmd/Ctrl + Shift + P)
- •Type "Developer: Open Logs Folder"
- •Navigate to the relevant log file
Method 2: Direct File Access
macOS Terminal:
cd ~/Library/Application\ Support/Cursor/logs/
ls -la
Windows PowerShell:
cd $env:APPDATA\Cursor\logs
dir
Linux Terminal:
cd ~/.config/Cursor/logs/
ls -la
Method 3: Real-time Monitoring
Watch logs as they're written:
# macOS/Linux
tail -f ~/Library/Application\ Support/Cursor/logs/main.log
# Windows (PowerShell)
Get-Content "$env:APPDATA\Cursor\logs\main.log" -Wait
What the Logs Tell You
Debugging AI Failures
When Cursor's AI makes a mistake, the logs show:
- •The exact prompt that was sent
- •The context included in the request
- •The model's response
- •Any errors or timeouts
Tracking Token Usage
Logs can reveal:
- •How many tokens each request uses
- •Which requests are most expensive
- •Where you might optimize
Understanding Context
The logs show what context Cursor sent to the AI:
- •Which files were included
- •What code was selected
- •System prompt modifications
The Problem with Raw Logs
Cursor's logs are verbose and hard to parse:
- •Thousands of lines per session
- •Mixed with non-AI events
- •No built-in search or filtering
- •JSON that's hard to read
This is where purpose-built tools help.
Better Logging with Tribecode
Tribecode captures Cursor AI activity in a structured, searchable format:
- •Clean capture: Only AI-relevant events
- •Searchable: Find specific prompts or errors
- •Session replay: See the full context of each interaction
- •Cross-tool: Same view for Cursor, Claude, ChatGPT
Common Cursor AI Issues (And How Logs Help)
Issue: AI Keeps Suggesting Wrong Code
What to check in logs:
- •Was the right file context included?
- •Is the prompt being truncated?
- •Are there model-specific errors?
Issue: Slow AI Responses
What to check in logs:
- •Network latency to API
- •Token count (larger = slower)
- •Rate limiting errors
Issue: AI Deleted My Code
What to check in logs:
- •Exact prompt that triggered the change
- •What context was included
- •Whether it was a misinterpreted instruction
Cursor Log Best Practices
1. Enable Debug Mode for Troubleshooting
When investigating issues:
- •Open Settings
- •Search for "log level"
- •Set to "debug" temporarily
- •Reproduce the issue
- •Check logs
- •Reset to "info" afterward
2. Clear Logs Periodically
Logs can grow large:
# Clear old logs (macOS/Linux)
rm ~/Library/Application\ Support/Cursor/logs/*.log.*
3. Save Logs Before Reporting Bugs
When filing a bug report:
- •Reproduce the issue
- •Copy relevant log sections
- •Include in your bug report
Frequently Asked Questions
Do Cursor logs contain my code?
Yes, logs may include code snippets sent to the AI. Handle them with appropriate security.
How long are Cursor logs kept?
Cursor rotates logs automatically, typically keeping recent logs only. Exact retention varies by version.
Can I disable Cursor logging?
You can reduce logging verbosity in settings, but some logging is required for the app to function.
Are Cursor logs sent to Cursor/Anysphere?
Check Cursor's privacy policy. Logs are primarily local, but crash reports may be sent with consent.
Beyond Raw Logs: Building a Feedback Loop
Raw logs are useful for debugging, but they don't help you improve your AI workflow over time.
To actually get better at using Cursor:
- •Track which prompts work well
- •Measure how often the AI helps vs. hinders
- •Identify patterns in failures
This is what observability tools are designed for.
Want better visibility into your Cursor AI workflow? Try Tribecode for structured logging and insights across all your AI coding tools.