Skip to content

fix: honor explicit pause requests while smart stepping - #2413

Merged
Connor Peet (connor4312) merged 1 commit into
microsoft:mainfrom
debugmcpdev:fix/explicit-pause-smart-step
Sep 22, 2026
Merged

Connor Peet (connor4312) merged 1 commit into
microsoft:mainfrom
debugmcpdev:fix/explicit-pause-smart-step

Conversation

@debugmcpdev

Copy link
Copy Markdown

An explicit DAP pause in skipped or unmapped code can be acknowledged and then consumed by automatic stepping, leaving the debuggee running without a usable stopped event.

Honor the explicit pause intent already recorded by Thread.pause() and reset the automatic-step counter. A manual pause can now expose an internal or generated frame; ordinary stepping, pauses without explicit pause intent, and the existing breakpoint/exception/entry exemptions retain their behavior. No launch defaults or public configuration change.

Fixes #2412

Validation

Tested on Windows x64 with Node v24.14.1, based on 41bd9bb831a46c2668cab14d8455e8e3bff58477.

  • New unit coverage exercises skipped and unmapped frames, preserved step directions and deliberate stops, and counter reset. Before the fix, four assertions fail; all 18 cases pass afterward.
  • The new Node integration test times out on unpatched main after an acknowledged pause and 1,437 continued events without a stopped event. With the fix, it pauses, reads the stack, evaluates an expression, and resumes.
  • npm run compile, npm run test:types, npm run test:unit (284 passing), and npm run test:lint pass.
  • npm run test:golden: 435 passing, 8 pending, 2 failing. The Deno doesn't duplicate --allow-all failure also reproduces on unpatched main. pretty print sources / bps passes when rerun on both main and this branch; a focused rerun with the new pause regression has 2 passing tests.
  • The rebuilt standalone DAP server passes the Express reproduction with smartStep: true. Downstream dogfooding through mcp-debugger's development proxy also succeeds: pause an idle mcp-debugger server, inspect/evaluate its state, hit a source-mapped TypeScript breakpoint in its HTTP handler, step over, and resume an HTTP 200 response.

@debugmcpdev

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@connor4312 Connor Peet (connor4312) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@connor4312
Connor Peet (connor4312) merged commit 372f7a5 into microsoft:main Sep 22, 2026
5 of 6 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.

Explicit DAP pause is swallowed by smart stepping on an idle Node/Express server

5 participants