Fix #15: add logpoints via a new add_logpoint tool#109
Merged
Conversation
Add an `add_logpoint` MCP tool for setting logpoints: breakpoints that log
a message (with {expression} interpolation) when a line is reached instead
of pausing execution. Useful for tracing values across loops/hot paths and
for timing-sensitive code where a hard pause would distort behavior.
Logpoints are SourceBreakpoints carrying a logMessage, so remove_breakpoint,
list_breakpoints, and clear_all_breakpoints handle them automatically;
list_breakpoints now labels entries Breakpoint/Logpoint and shows the
message. Wired through the multi-window routing/control-server path and
covered by a routing test. Bumped version to 2.2.4 and updated the README
tools table and debug-live skill.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6ea24b92-40ad-4539-aa13-61aa6ff8751f
✅ Extension Build Successful!📦 VSIX artifact is ready for download Scroll down to the "Artifacts" section and download To install: In VS Code, run |
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.
Summary
Implements #15 — support logpoints.
Adds a new
add_logpointMCP tool that sets a logpoint: a breakpoint that logs a message instead of pausing when a line is reached. Messages support{expression}interpolation (evaluated by the debug adapter), and an optionalconditiononly logs when true.Logpoints are
SourceBreakpoints carrying alogMessage, soremove_breakpoint,list_breakpoints, andclear_all_breakpointshandle them for free.list_breakpointsnow labels each entryBreakpoint/Logpointand shows the log message.Why
Logpoints let an agent trace how a value evolves across loops/hot paths without repeatedly stopping and continuing, and avoid distorting timing-sensitive code that a hard pause would perturb.
Changes
debuggingExecutor.ts—addBreakpointgains an optionallogMessagepassed toSourceBreakpoint.debuggingHandler.ts— newhandleAddLogpoint(validates 1-based line bounds + non-empty message);handleListBreakpointsdistinguishes logpoints.debugMCPServer.ts—add_logpointtool registration.routingDebuggingHandler.ts+controlServer.ts— multi-window forwarder + dispatch case.README.md(tools table) +skills/debug-live/SKILL.md(allowed-tools + guidance).Testing
npm run compile,npm run lintclean.npm test— 96 passing (added anadd_logpointrouting test).Closes #15