Debug mode: browser fetch to ingest server (127.0.0.1:7772) never writes debug-<sessionId>.log — agent can't read runtime evidence

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Debug mode injected fetch to 127.0.0.1:7772/ingest/… in my React app. After reproducing twice, debug-b473a1.log was never created. Shell POST to ingest worked, but browser logs did not (likely CORS from localhost:5000). Agent could not read runtime evidence and had to use console.debug + git instead. Is there a supported way to get browser debug logs into the workspace file?

Steps to Reproduce

  1. Ask the agent to add debug instrumentation for a browser-based UI flow.
  2. Agent injects fetch(‘http://127.0.0.1:7772/ingest/…’) into React components.
  3. Run the app in the browser and walk through the reproduction steps.
  4. Click Proceed / Mark as fixed.
  5. Agent tries to read debug-b473a1.log in the workspace root.

Expected Behavior

  • Browser instrumentation POSTs are received by the ingest server.
  • Logs are written to debug-.log in the workspace.
  • The agent reads that file and uses it to confirm or reject hypotheses.

Operating System

Windows 10/11

Version Information

Version: 3.14.7 (user setup)
VS Code Extension API: 1.128.0
Commit: a758f2241ca99fecf380180b6cbdbbce0f1f42c0
Date: 2026-07-30T06:41:34.009Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Composer 2.5

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. First, the main point: browser fetch → local ingest server → a file in the workspace is a supported flow, and it accepts cross-origin requests from a localhost dev server including localhost:5000. So CORS is most likely not the issue here.

The log is not written to the workspace root, it goes into the .cursor\ subfolder. First thing, check if the file exists here:

e:\dev\projects\...\.cursor\debug-b473a1.log

Then there are two possibilities:

  1. File exists and it has content. This is a known issue we are tracking: the agent looks for the log via grep or glob, and those respect .gitignore. If your project .gitignore has *.log, the file becomes invisible to search even though it exists. I can’t share an ETA yet. Workaround: open .cursor\debug-<sessionId>.log, drag it into the context field as an @-mention, and press Enter instead of clicking Proceed. That way the agent will definitely receive the contents.

  2. The file is missing or empty. In that case, the instrumented fetch() likely didn’t run in the runtime yet. With Node and TS runtimes using HMR, this can happen if the task starts before the dev server fully reloads with the instrumented code. Start the dev server, wait for the full reload after instrumentation, and only then run your repro steps. A 204 response from the server only means it’s up and accepted the request, not that real events were written.

Related threads: Debug mode, log file not found

Let me know if the file exists under .cursor\ and what’s inside it, and I can tell which of the two cases you’re hitting.

The log file exists at: e:\dev\projects\**\.cursor\debug-b473a1.log (not in the workspace root).

It has 2,200+ lines of runtime events from my repro. The agent never found it because:

  1. It searched the workspace root and .cursor/projects/... instead of .cursor/debug-<sessionId>.log in the repo
  2. .cursor/ is in our .gitignore, so grep/glob skipped it

Workaround that worked:

  • @.cursor/debug-b473a1.log in chat instead of only clicking Proceed.
  • I also built a Vite middleware (/__debug/agent-log) that writes to the workspace root to avoid the gitignore issue

Great that you found the file and that @.cursor/debug-b473a1.log worked. That’s exactly the case I mentioned. The log gets written to .cursor\, but since that folder is in your .gitignore, the agent’s grep or glob can’t see it, so it looks in the workspace root instead.

The agent not finding the log under .cursor\ especially on Windows is an issue we’re tracking. I can’t share an ETA yet, but I’ll post in the thread if there’s an update.

For day-to-day options:

  • Paste @.cursor\debug-<sessionId>.log into the chat and press Enter instead of clicking Proceed. That’s the simplest path, and you’ve already confirmed it works.
  • Move your Vite middleware to the workspace root. That also works if you want to fully avoid .gitignore.

Let me know if anything else behaves oddly.