Repository navigation
Keep the latest debugger source refresh - #347124
Connor Peet (connor4312) merged 2 commits into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change to preserve the latest requested debugger source content during overlapping refreshes.
No open issues 🎉
What changed in this PR
Fixes #347123 by ensuring overlapping debugger source refreshes preserve the latest requested content in VS Code’s debug source models.
Changes:
- Establishes update ownership before loading source content, ignores stale responses and errors, and restricts pending-entry cleanup to the owning operation.
- Adds regression coverage for response ordering, delayed minimal edits, disposal, and sequential updates including empty content.
No actionable findings remain. Reported validation uses synthetic workbench-level tests, not a native debug session or packaged release.
| File | Description |
|---|---|
src/vs/workbench/contrib/debug/test/browser/debugSource.test.ts |
Adds source-refresh ordering and lifecycle regression tests. |
src/vs/workbench/contrib/debug/common/debugContentProvider.ts |
Guards refresh ownership and cancellation to prevent stale updates. |
Review effort: Balanced
|
Sameer (@sameerihs) looks like some test failures, will want to normalize crlf |
Head branch was pushed to by a user without write access
82af03c
|
Thanks, that assertion was assuming LF. Fixed in 82af03c: the test now reads the model with |
a4fb6eb
into
microsoft:main
Fixes #347123
Overlapping debugger source refreshes can let an older DAP response replace newer source text. Establish request ownership before awaiting the source response, ignore obsolete results and errors, and allow only the current operation to clear its pending entry.
Regression tests cover response ordering, stale errors, minimal-edit completion and disposal. Current errors and initial source creation retain their existing behaviour. Focused tests, client compilation/typechecking and changed-file lint pass.
Validation is at the workbench service level with synthetic adapter and minimal-edit responses. It does not claim a native DAP session or packaged-stable execution.