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
DAP: a bound breakpoint is shown as invalid when another session of the tree answers verified=false last #1898
I found this one in August too, right after a local fix for #1897: with the session kept
alive, a breakpoint that had hit showed the red "invalid" icon and still hit.
Same setup as #1897. Set a line breakpoint in app.js at the first line that runs.
Expected: the breakpoint shows as verified while the session of the page has it bound.
Actual: it often shows the red "invalid" icon with "Unbound breakpoint", but it still hits.
The result depends on the order of the answers.
What js-debug sends
DAPBreakpointHandlerBase
sends each breakpoint to every session. Only the session of the page binds it. In the trace of the
page from #1897, the answer of another session comes after the bind:
A test in DAPBreakpointHandlerBaseTest shows it: one server binds the breakpoint, and then
another server answers verified=false. On main:
testBreakpointBoundByOneSessionStaysVerified
junit.framework.ComparisonFailure: expected:<[verified]> but was:<[invalid: Unbound breakpoint]>
Suggested fix
Keep the answers per DAP server for each breakpoint: verified while at least one server reports
it bound, and invalid only when none does. Forget a server's answers when its session
terminates. This covers line, function and data breakpoints. The callers then pass the server
that answered: the setBreakpoints responses and the breakpoint "changed" event.
If you agree, I can include it in the same PR, with the test above.
AI/tooling disclosure: I found this bug while working, and I used Claude Code for the analysis,
the fix and the test. I reviewed the result and understand the problem.
Activity
angelozerr commentedon Nov 9, 2026
@leotimus please create a PR
fix(dap): keep a breakpoint verified while one session of the tree ha…
fix(dap): keep a breakpoint verified while one session of the tree ha…
docs: the DAP session tree and the API changes in the change notes fo…
fix(dap): keep a breakpoint verified while one session of the tree ha…
fix(dap): keep a breakpoint verified while one session of the tree ha…
docs: change notes for 0.30.0 (#1941)