feat: breakpoint management tools — list/remove/clear + DAP breakpoint-event wiring (fixes #236) - #267
Merged
Merged
Conversation
…t wiring - Breakpoint model gains adapterId (adapter-assigned numeric id), captured from setBreakpoints responses in the positional merge. - Extract syncBreakpointsForFile from setBreakpoint: shared replace-all re-send + response merge used by set/remove/clear. Never throws; DAP failures surface as a warning while the store stays authoritative. - New SessionManager methods: listBreakpoints (sorted, optional file filter), removeBreakpoint (by id), removeBreakpointsByLocation (file+line, removes duplicates together), clearBreakpoints (one file or all). All deliberately work in TERMINATED lifecycle so breakpoints can be adjusted between launches; only the live DAP sync is skipped. - Wire DAP breakpoint events end-to-end (previously dropped): connection manager onBreakpoint -> worker sendDapEvent -> typed ProxyManager breakpoint event -> session-manager listener that applies deferred verification/relocation (match by adapterId, fall back to file+line). js-debug child sessions forward events generically, so child breakpoint events surface through the same path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…y sync, docs
- Three new tools: list_breakpoints (sorted, optional file filter, count),
remove_breakpoint (by id, or file+line removing all at that location),
clear_breakpoints (session-wide or per file). All deliberately usable in
TERMINATED lifecycle so breakpoints can be adjusted between launches;
session-lifecycle errors surface as {success:false} like set_breakpoint.
- resolveBreakpointFile extracted from setBreakpoint and shared by the
file-addressed forms (FQCN passthrough, attach passthrough, container
translation); removal does not require the file to still exist.
- Post-launch breakpoint sync: the worker applies initialBreakpoints but its
setBreakpoints responses never reached the session store, so pre-launch
breakpoints stayed verified:false forever on adapters that do not push
breakpoint events. After a successful launch each breakpoint file is
re-synced (replace-all with the identical set, idempotent), landing
verified state and adapter ids in the store for every adapter.
- Breakpoint-event path matching tolerates Windows drive-letter case
differences (js-debug lowercases the drive letter).
- E2E: new language-parameterized suite mcp-server-breakpoint-management
(8 languages, toolchain-skip; verification polling since js-debug binds
asynchronously); shared tests/e2e/language-matrix-utils.ts extracted from
comprehensive-mcp-tools; comprehensive suite gains Tool 4b-4d steps and
its ALL_TOOLS list grows 21 -> 24.
- Docs: tool-reference sections + TOC repair, README table, usage.md,
CLAUDE.md tool list 22 -> 25, skill copies drop the "no breakpoint
list/remove tools" limitation and teach the bisection-window workflow.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #236.
Agents no longer have write-only breakpoints: this adds
list_breakpoints,remove_breakpoint, andclear_breakpoints, wires the previously-dropped DAPbreakpointevents end-to-end, and fixes a pre-existing gap where launch-time breakpoints never learned their verified state.New tools
list_breakpoints {sessionId, file?}— flat array sorted by file/line withverified,condition,suspendPolicy,message, and the adapter-assigned numericadapterId; pluscount.remove_breakpoint {sessionId, breakpointId | file+line}— id form removes one; file+line removes every breakpoint at that location (duplicates at a line are legal and DAP replace-all cannot distinguish them positionally). File addressing goes through the same resolution asset_breakpoint(Java FQCN passthrough, attach passthrough, container translation) but does not require the file to still exist.clear_breakpoints {sessionId, file?}— whole session or one file; clearing zero is success.All three deliberately work in TERMINATED lifecycle (unlike
set_breakpoint): a terminated-but-unclosed session keeps its queued breakpoints so they can be inspected/adjusted between launches — groundwork forrestart_debugging(#238). Only the live DAP sync is skipped. On live sessions, removal/clear re-send the file's remaining set immediately (DAP replace-all; empty array clears the file). A DAP failure never loses the store mutation — it surfaces as awarning.Pipeline fixes underneath
syncBreakpointsForFileextraction — the replace-all re-send + positional response merge is now shared by set/remove/clear, and captures the adapter's breakpointidintoadapterId.breakpointevents were dropped entirely (MinimalDapClient emitted them; nobody listened). Now wired: connection-manageronBreakpoint→ worker forward → typed ProxyManager event → session-manager listener that applies deferred verification/relocation, matching byadapterIdwith a (file, line) fallback. The fallback tolerates Windows drive-letter case differences — js-debug lowercasesc:\. js-debug child-session events forward generically through the parent client, so child breakpoint events ride the same path.initialBreakpointsitself, but itssetBreakpointsresponses never reached the session store, so pre-launch breakpoints stayedverified:falseforever on adapters that don't push breakpoint events (debugpy, Delve, rdbg, CodeLLDB...). After a successful launch, each breakpoint file is re-synced (replace-all with the identical set — idempotent), landing verified state and adapter ids in the store for every adapter and both launch paths (worker + js-debug handshake).Tests
removeBreakpointinstead of hand-editing the map.tests/e2e/mcp-server-breakpoint-management.test.ts— language-parameterized across all 8 adapters (toolchain-skip for CI): set 2 bps → launch → paused → list shows verified + adapterId (polling: js-debug binds asynchronously) → remove the later bp by id → clear the rest → continue → program must run to completion, which fails if either the removal or the clear did not reach the adapter. 8/8 pass locally. Shared fixture/toolchain logic extracted totests/e2e/language-matrix-utils.ts;comprehensive-mcp-toolsnow imports it and gains Tool 4b–4d steps (ALL_TOOLS 21 → 24; full suite green locally, 74/74 — the rubyget_outputmatrix cell soft-records a known-timing-sensitive marker miss unrelated to this change).Docs
tool-reference.md (3 new sections + stale-TOC repair), README tool table, usage.md, CLAUDE.md tool list (22 → 25), and both skill copies (
src/skill-content.ts,skills/debugging/SKILL.md) — the "No breakpoint list/remove tools yet" limitation is gone, replaced by the move-the-bisection-window workflow.🤖 Generated with Claude Code