Skip to content

fix: use VS Code commands for continue/step to fix exception UI#21

Merged
TPreece101 merged 1 commit intomainfrom
fix/exception-after-continue
Feb 13, 2026
Merged

fix: use VS Code commands for continue/step to fix exception UI#21
TPreece101 merged 1 commit intomainfrom
fix/exception-after-continue

Conversation

@TPreece101
Copy link
Copy Markdown
Contributor

@TPreece101 TPreece101 commented Feb 13, 2026

Summary

  • Fix exception-after-continue bug: session.customRequest('continue') bypassed VS Code's internal debug model state updates, so when an exception occurred after continuing from a breakpoint, the UI never showed the exception and the debugger appeared stuck. Now uses vscode.commands.executeCommand('workbench.action.debug.continue') (and equivalent step commands) by default, which properly updates the model state. Falls back to customRequest only when explicit threadId or granularity is needed.
  • Pass stop reason metadata to LLMs: Tool responses now include reason (e.g. "breakpoint", "exception", "step"), description, and exceptionText fields so LLMs can distinguish why the debugger stopped and see exception messages without needing a separate evaluate call.
  • Add regression test: New exception-continue.test.ts suite covers the breakpoint → continue → exception scenario, verifying proper stop detection and that exception metadata is present in the response.

Test plan

  • All 77 tests pass (npm test), including new exception-after-continue suite
  • Manual: set breakpoint, launch, continue via MCP, trigger exception — verify exception shows in VS Code UI
  • Manual: verify LLM-facing response includes reason: "exception" and description fields

🤖 Generated with Claude Code

…ass stop reason to LLM

session.customRequest('continue') bypassed VS Code's internal debug model
state updates, so the model never transitioned to "running". When an
exception's stopped event arrived, VS Code didn't properly process it —
the exception dialog never showed and the debugger appeared stuck.

Switch to vscode.commands.executeCommand for continue/step actions by
default, falling back to customRequest only when explicit threadId or
granularity is needed.

Also pass through DAP stop metadata (reason, description, exceptionText)
in tool responses so LLMs can distinguish breakpoints from exceptions and
see the error message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 87.80488% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.70%. Comparing base (52f7379) to head (e34c467).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/debug-server.ts 85.91% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   74.87%   75.70%   +0.83%     
==========================================
  Files           7        8       +1     
  Lines        1210     1268      +58     
  Branches      152      160       +8     
==========================================
+ Hits          906      960      +54     
- Misses        302      306       +4     
  Partials        2        2              
Flag Coverage Δ
extension 75.70% <87.80%> (+0.83%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TPreece101 TPreece101 merged commit f85e73b into main Feb 13, 2026
6 checks passed
@TPreece101 TPreece101 deleted the fix/exception-after-continue branch February 13, 2026 16:17
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.

1 participant