Bug
start_debugging for a JavaScript script that crashes almost immediately after launch (e.g. an uncaught throw from a ~100ms timer callback) sometimes never resolves — the MCP call times out at 60s. startDebugging's waitForReady has a 30s cap and listens for terminated/exited/exit, so the hang is upstream of it — likely the js-debug launch orchestration (launch barrier / child-session adoption) racing the debuggee's death: the child target dies while adoption is in flight and whatever the parent launch request is awaiting never settles.
Meanwhile the session itself reaches state: 'stopped' correctly (the proxy worker logs a complete shutdown sequence ~2s after launch) — only the start_debugging response is stuck.
Repro (verified on main @ 2a93227)
// crash.js
function boom() { throw new Error('js uncaught exception'); }
setTimeout(boom, 100);
create_debug_session (javascript)
start_debugging crash.js with dapLaunchArgs: { stopOnEntry: false }
- The call sometimes returns after ~17s with
state: 'stopped' (readiness-window timeout), sometimes hangs past the 60s MCP client timeout. Racy — depends on crash timing vs. child adoption.
Impact
An agent debugging a crashing Node script without breakpoints gets a hung tool call instead of a prompt "terminated" result. Found while validating #220 (break-on-exception): the with-breakOnExceptions path is unaffected because the session pauses at the exception before the debuggee can die.
Expected
start_debugging resolves promptly (well under the readiness cap) when the debuggee terminates during launch, regardless of js-debug child-session adoption state.
Bug
start_debuggingfor a JavaScript script that crashes almost immediately after launch (e.g. an uncaught throw from a ~100ms timer callback) sometimes never resolves — the MCP call times out at 60s.startDebugging'swaitForReadyhas a 30s cap and listens forterminated/exited/exit, so the hang is upstream of it — likely the js-debug launch orchestration (launch barrier / child-session adoption) racing the debuggee's death: the child target dies while adoption is in flight and whatever the parentlaunchrequest is awaiting never settles.Meanwhile the session itself reaches
state: 'stopped'correctly (the proxy worker logs a complete shutdown sequence ~2s after launch) — only thestart_debuggingresponse is stuck.Repro (verified on main @ 2a93227)
create_debug_session(javascript)start_debuggingcrash.js withdapLaunchArgs: { stopOnEntry: false }state: 'stopped'(readiness-window timeout), sometimes hangs past the 60s MCP client timeout. Racy — depends on crash timing vs. child adoption.Impact
An agent debugging a crashing Node script without breakpoints gets a hung tool call instead of a prompt "terminated" result. Found while validating #220 (break-on-exception): the with-
breakOnExceptionspath is unaffected because the session pauses at the exception before the debuggee can die.Expected
start_debuggingresolves promptly (well under the readiness cap) when the debuggee terminates during launch, regardless of js-debug child-session adoption state.