You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
list_debug_sessions (and the session snapshot generally) never includes exitCode for JavaScript sessions. Python (debugpy) and the mock adapter surface it via the DAP exited event's exitCode (#220); js-debug launches leave it undefined even after the debuggee demonstrably exits non-zero.
Repro (verified on fix/242-js-launch-barrier-hang @ a8329d6, after #242 was fixed)
create_debug_session (javascript)
start_debuggingtests/fixtures/debug-scripts/js-throws.js with dapLaunchArgs: { stopOnEntry: false } (no breakOnExceptions)
The debuggee runs in a js-debug child session; the child's exited event body (or the lack of one) doesn't reach SessionManagerCore.handleExited's exitCode capture the way the parent-session path does. Child events are re-emitted verbatim by MinimalDapClient/ChildSessionManager — worth checking whether js-debug even sends exitCode on the child exited event or whether it's dropped in forwarding.
Impact
An agent can't distinguish a crash (exit 1) from a clean exit (exit 0) for JavaScript — the exact contract #220 added for other adapters. This is why the #242 e2e regression guard (tests/e2e/mcp-server-break-on-exceptions.test.ts, js no-option test) asserts state/reason only, unlike its python twin which asserts exitCode non-zero. When this is fixed, strengthen that test to match.
Bug
list_debug_sessions(and the session snapshot generally) never includesexitCodefor JavaScript sessions. Python (debugpy) and the mock adapter surface it via the DAPexitedevent'sexitCode(#220); js-debug launches leave it undefined even after the debuggee demonstrably exits non-zero.Repro (verified on fix/242-js-launch-barrier-hang @ a8329d6, after #242 was fixed)
create_debug_session(javascript)start_debuggingtests/fixtures/debug-scripts/js-throws.jswithdapLaunchArgs: { stopOnEntry: false }(nobreakOnExceptions)state: 'stopped'([BUG] start_debugging hangs past 60s for a fast-crashing JavaScript script #242 fixed), butlist_debug_sessionsshows noexitCodeand nolastStopLikely area
The debuggee runs in a js-debug child session; the child's
exitedevent body (or the lack of one) doesn't reachSessionManagerCore.handleExited's exitCode capture the way the parent-session path does. Child events are re-emitted verbatim byMinimalDapClient/ChildSessionManager— worth checking whether js-debug even sendsexitCodeon the childexitedevent or whether it's dropped in forwarding.Impact
An agent can't distinguish a crash (exit 1) from a clean exit (exit 0) for JavaScript — the exact contract #220 added for other adapters. This is why the #242 e2e regression guard (
tests/e2e/mcp-server-break-on-exceptions.test.ts, js no-option test) asserts state/reason only, unlike its python twin which assertsexitCodenon-zero. When this is fixed, strengthen that test to match.