Add Run and Debug session state regression tests - #14736
Add Run and Debug session state regression tests#14736Sean McManus (sean-mcmanus) wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The tests directly cover the previously deferred external-file and language-transition regressions.
Pull request overview
Adds regression coverage for session-state tracking introduced in #14719.
Changes:
- Tests external C++ files outside the workspace.
- Tests session-state updates across language-mode changes.
- Adds asynchronous state assertions and temporary-file cleanup.
File summaries
| File | Description |
|---|---|
Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts |
Adds focused Run and Debug session-state regression tests. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✨Copilot: Prashant Kumar Rai (@8prashant) This is the follow-up regression coverage from #14719. GitHub does not allow requesting reviews from non-collaborators, but your feedback here is welcome. |
There was a problem hiding this comment.
Hi Sean McManus (@sean-mcmanus), I reviewed the follow-up PR. The new tests cover the two scenarios from PR #14719:
- An external C++ source file is correctly identified as a source file but not as part of the workspace.
- The session state updates correctly when the active document changes from C++ to plaintext and back to C++.
The tests also exercise the actual language-change behavior and include cleanup for the temporary files. The compile and scenario test results are passing, and I did not find any blocking issues.
Approved from my side.
Summary
Add regression coverage for Run and Debug session state when a C++ source file is outside the open workspace and when the active document changes language. This follows up on the coverage deferred from #14719.
Validation
yarn compileDISPLAY=:0 yarn ts-node -T .scripts/test.ts --scenario=SingleRootProject(56 passing)onDidOpenTextDocumentlistener as a reversible mutation; the new language-transition test failed becausebuildAndDebugIsSourceFileremainedfalseafter switching back to C++, then passed after restoration.Context
The follow-up was requested in the review discussion on #14719.