Skip to content

js attach: pause_execution stays pending forever on an idle Node server — the stop never lands even once JS runs #513

Description

@debugmcpdev

Summary

On a javascript attach session against an idle Node HTTP server (an mcp-debugger instance, as it happens), pause_execution returns the documented pending: true shape — but the promised follow-up stop never lands, even after the target demonstrably executes plenty of JavaScript (it served multiple HTTP requests in the interim). The session stays running indefinitely; get_stack_trace keeps answering "Session is not paused". Retried twice minutes apart, same result.

Repro

  1. node --inspect=127.0.0.1:9339 dist/index.js http -p 3111 (any long-lived mostly-idle Node server works)
  2. create_debug_session {language: javascript}attach_to_process {port: 9339, stopOnEntry: false} — succeeds, state running
  3. pause_execution {sessionId}{"success":true,"state":"running","data":{"pending":true,"message":"Pause requested; no 'stopped' event within 5s …"}}
  4. curl http://127.0.0.1:3111/health several times — the server responds 200 each time, so JS is executing
  5. list_debug_sessions → still running; get_stack_trace"Session is not paused (state: running)" — held for minutes

Expected

The tool's own contract: "The session will report 'paused' once the stop lands." With the event loop provably running JS, the stop should land on the next dispatch — this is how CDP Debugger.pause behaves under an IDE.

Notes / suspicions

Environment

main @ 9b220a2, Linux, Node 22.22.3, vendored js-debug.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NgA5kHzkhFZLqbWNZRTsVG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions