Repository navigation
Preserve newer debugger stop details during continued cleanup - #339530
Merged
Connor Peet (connor4312) merged 1 commit intoOct 8, 2026
Merged
Connor Peet (connor4312) merged 1 commit into
Connor Peet (connor4312) merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The narrowly scoped event-ordering fix has focused regression coverage and no unresolved findings.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes #339076 by preserving newer debugger stop details, preventing the Call Stack pause reason from disappearing after rapid continue/stop events.
Changes:
- Clears affected stop records immediately on continuation, leaving thread cleanup scheduled.
- Adds six regression tests covering event ordering and single/all-thread continuation.
| File | Description |
|---|---|
| src/vs/workbench/contrib/debug/test/browser/debugSession.test.ts | Adds continuation regression tests using a fake adapter. |
| src/vs/workbench/contrib/debug/browser/debugSession.ts | Moves stop-record cleanup before asynchronous scheduling. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Connor Peet (connor4312)
enabled auto-merge
October 8, 2026 16:07
roblourens
approved these changes
Oct 8, 2026
Eleanor Boyd (eleanorjboyd)
approved these changes
Oct 8, 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.
Fixes #339076.
A quick
continued→stoppedsequence can leave a thread paused while its Call Stack pause reason is missing. The continued handler removes session stop details after awaiting thread-status scheduling, so it can also remove a newer stop recorded during that wait.Clear the affected session stop details when the continued event arrives, matching the existing eager recording of stopped events. Thread cancellation and cleanup remain scheduled. Single-thread continuation preserves other threads' records; all-thread continuation clears earlier records, including stops without a thread ID.
Add six tests using DebugSession and RawDebugSession with a fake protocol adapter. They cover newer single/all-thread stops, ordinary continuation, an unaffected stopped thread, and an all-thread stop without a thread ID. Three defect assertions fail against unmodified main and pass with the change.
Validation for
7850f8fac1e91b5b6e45a04eecd15027dcb56a3b, based on main5983cda0c8126417e5a9cdf33d0be2f4000d3f04:Fork validation: cross-platform/source checks, Linux Electron rerun. The initial Linux Electron job failed before tests due to sandbox-helper permissions; the corrected runner passed. Fork-only workflow commits are excluded from this PR.