Debug mode frequently lose logs

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

This is a very old bug that still happens and annoys me a little, almost always the debug agent cannot find the generated logs by itself. The logs are generated and I can see them in the log preview inside the agent, but the agent simply says “I can’t find the logs, so they are not being generated” and replace everything with a console.log. So I always need to stop the agent and copy and paste the logs in the chat so the agent can find the file the logs are.

Steps to Reproduce

Use debug mode and generate logs.
Ask to proceed, and the agent will not find the logs it just created

Expected Behavior

It should find the logs as they exist

Operating System

Windows 10/11

Version Information

Version: 3.3.30 (system setup)
VSCode Version: 1.105.1
Commit: 3dc559280adc5f931ade8e25c7b85393842acf30
Date: 2026-05-09T18:28:42.332Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, this is a known bug. The root cause is that the agent often looks for the log via grep or glob, and those run through ripgrep, which respects .gitignore. Since most projects have *.log in .gitignore, the file becomes invisible to search, and the agent decides there are no logs and falls back to console.log. Even though the system prompt includes the exact path .cursor/debug-<sessionId>.log and tells it to read it directly.

We can reproduce it and we’re tracking it internally. I can’t share an ETA for a fix yet.

Workaround for now: instead of clicking Proceed, drop the file .cursor/debug-<sessionId>.log into the chat as an @-mention so the agent definitely gets the contents.

Related discussion thread: Debug mode, log file not found