Skip to content

Fix #15: add logpoints via a new add_logpoint tool#109

Merged
ozzafar merged 1 commit into
mainfrom
ozzafar/issue-15-logpoints
Jul 20, 2026
Merged

Fix #15: add logpoints via a new add_logpoint tool#109
ozzafar merged 1 commit into
mainfrom
ozzafar/issue-15-logpoints

Conversation

@ozzafar

@ozzafar ozzafar commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements #15 — support logpoints.

Adds a new add_logpoint MCP 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 optional condition only logs when true.

Logpoints are SourceBreakpoints carrying a logMessage, so remove_breakpoint, list_breakpoints, and clear_all_breakpoints handle them for free. list_breakpoints now labels each entry Breakpoint/Logpoint and 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.tsaddBreakpoint gains an optional logMessage passed to SourceBreakpoint.
  • debuggingHandler.ts — new handleAddLogpoint (validates 1-based line bounds + non-empty message); handleListBreakpoints distinguishes logpoints.
  • debugMCPServer.tsadd_logpoint tool registration.
  • routingDebuggingHandler.ts + controlServer.ts — multi-window forwarder + dispatch case.
  • README.md (tools table) + skills/debug-live/SKILL.md (allowed-tools + guidance).
  • Version bump 2.2.3 → 2.2.4.

Testing

  • npm run compile, npm run lint clean.
  • npm test — 96 passing (added an add_logpoint routing test).

Closes #15

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
@github-actions

Copy link
Copy Markdown

✅ Extension Build Successful!

📦 VSIX artifact is ready for download

👉 View artifacts

Scroll down to the "Artifacts" section and download extension-vsix

To install: In VS Code, run Extensions: Install from VSIX... and select the downloaded file.

@ozzafar
ozzafar merged commit 6f02fa0 into main Jul 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support logpoints

1 participant