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
{{ message }}
Repository navigation
start_debugging should carry location and note when it answers a stop; get_stack_trace as the other carrier of the stale-build note (#950 follow-up) #951
#950 extends the stale-build warning to the compiled languages, but for them the artefact is known only once the launch has been transformed, so nothing can be said before start_debugging. The first chance is therefore a stop answer — and the most common agent flow for a fast program never reads one that carries it:
set_breakpoint → no launch yet: the echo stands alone
start_debugging → answers `paused, reason: breakpoint` with no `location` and no `note`
get_stack_trace → carries no note
get_local_variables → carries no note
Measured on the dev proxy with the .NET and Java fixtures while verifying #950: the start_debugging answer for a breakpoint reached during the launch has no location slot (the #823 launch-answer shape), so describeStaleBuild is never asked. Only wait_for_stop on the already-paused session, step_*, pause_execution, or a second set_breakpoint after the launch surface the sentence.
Proposal
start_debugging carries location (and the notedescribeStaleBuild adds) when it answers a stop, the way wait_for_stop does — one describeStopLocation read on the launch answer's paused arm.
get_stack_trace appends the same note when the top frame's file binds through a stale artefact: it is the other natural carrier, and the one the fast-program flow always calls.
Until then the natives' first chance is wait_for_stop; docs/tool-reference.md and the Java/.NET guides name the carriers.
start_debugging (and restart_debugging, which replays a launch) carries location, context, and threadId/note when it answers a stop, the way wait_for_stop does — one describeStopLocation read on the launch answer's PAUSED arm (an auto-continued entry stop never reaches it: the readiness wait's microtask re-read, wait_for_stop: block until a session's next stop or end instead of polling list_debug_sessions #849, sees the RUNNING the continue sets). location and threadId sit at the top level and in data; context and the full note at the top level. The launch message is unchanged.
get_stack_trace appends the same stale-build sentence when the file of its top frame is newer than the compiled file the debugger binds it through — the top frame only, and not a <…> label, a relative spelling or an unresolvedSource frame. The same openable-path rule now gates the line read and the stale probe on every stop answer.
Measured on the dev proxy (Windows, aged dotnet.dll, breakpoint in Program.cs):
call
before
after
start_debugging (paused at the breakpoint)
data.reason: "breakpoint", nothing else
top-level location (Program.cs:8), context, note naming the DLL and the source with both mtimes
get_stack_trace
no note
the same note
wait_for_stop (control)
the note
the note
after dotnet build, relaunch
—
location + context, no note, on both
Python stopOnEntry launch (control)
—
location (hello.py:1) + context, no note
So the fast-program flow set_breakpoint → start_debugging → get_stack_trace → get_local_variables now sees the sentence twice where it saw it zero times.
Also in the PR: the three identical hoist-plus-stale-check blocks in execution-tools.ts (step, wait_for_stop, pause_execution) became one helper, hoistStopLanding, which the two launch handlers call as well; the start_debugging and get_stack_trace tool descriptions name the new fields; the seven doc pages that said "(#951)" now name the carriers.
CI-run proof with a real adapter: the #823 case in tests/integration/javascript-launch-config.test.ts asserts the launch answer's location.line and context at the line-9 breakpoint. The Java/.NET/C++/JavaScript e2e aging cases assert the launch carrier (.NET, JavaScript — the fixtures that are paused when the launch answers) and the get_stack_trace carrier (all four); those files run on no CI lane.
Not done here, deliberately:lastStop on the launch answer (reason is there; wait_for_stop and get_stack_trace carry the record); the launch message wording; a note on get_local_variables/get_variables; an unresolvedSource flag on location itself (an absolute path behind a sourceReference is still probed — a probe of a file that exists here is a fair one).
Side finding while measuring: #959 (a .NET launch without dapLaunchArgs.program passes the .cs to netcoredbg and fails with a bare 0x800700c1).
Activity
feat(breakpoints): warn when a compiled language's source is newer th…
fix(handlers): one openable-path rule for every stop carrier; drop th…
feat(launch): start_debugging answers a stop with where it is, and ge…
debugmcpdev commentedon Oct 19, 2026
Shipped in #960.
Both proposals, as filed:
start_debugging(andrestart_debugging, which replays a launch) carrieslocation,context, andthreadId/notewhen it answers a stop, the waywait_for_stopdoes — onedescribeStopLocationread on the launch answer's PAUSED arm (an auto-continued entry stop never reaches it: the readiness wait's microtask re-read, wait_for_stop: block until a session's next stop or end instead of polling list_debug_sessions #849, sees the RUNNING the continue sets).locationandthreadIdsit at the top level and indata;contextand the fullnoteat the top level. The launchmessageis unchanged.get_stack_traceappends the same stale-build sentence when the file of its top frame is newer than the compiled file the debugger binds it through — the top frame only, and not a<…>label, a relative spelling or anunresolvedSourceframe. The same openable-path rule now gates the line read and the stale probe on every stop answer.Measured on the dev proxy (Windows, aged
dotnet.dll, breakpoint inProgram.cs):start_debugging(paused at the breakpoint)data.reason: "breakpoint", nothing elselocation(Program.cs:8),context,notenaming the DLL and the source with both mtimesget_stack_tracenotenotewait_for_stop(control)notenotedotnet build, relaunchlocation+context, nonote, on bothstopOnEntrylaunch (control)location(hello.py:1) +context, nonoteSo the fast-program flow
set_breakpoint → start_debugging → get_stack_trace → get_local_variablesnow sees the sentence twice where it saw it zero times.Also in the PR: the three identical hoist-plus-stale-check blocks in
execution-tools.ts(step,wait_for_stop,pause_execution) became one helper,hoistStopLanding, which the two launch handlers call as well; thestart_debuggingandget_stack_tracetool descriptions name the new fields; the seven doc pages that said "(#951)" now name the carriers.CI-run proof with a real adapter: the #823 case in
tests/integration/javascript-launch-config.test.tsasserts the launch answer'slocation.lineandcontextat the line-9 breakpoint. The Java/.NET/C++/JavaScript e2e aging cases assert the launch carrier (.NET, JavaScript — the fixtures that are paused when the launch answers) and theget_stack_tracecarrier (all four); those files run on no CI lane.Not done here, deliberately:
lastStopon the launch answer (reasonis there;wait_for_stopandget_stack_tracecarry the record); the launchmessagewording; anoteonget_local_variables/get_variables; anunresolvedSourceflag onlocationitself (an absolute path behind asourceReferenceis still probed — a probe of a file that exists here is a fair one).Side finding while measuring: #959 (a .NET launch without
dapLaunchArgs.programpasses the.csto netcoredbg and fails with a bare0x800700c1).