Skip to content

Add Run and Debug session state regression tests - #14736

Open
Sean McManus (sean-mcmanus) wants to merge 3 commits into
mainfrom
seanmcm/devbox2-wsl/agent146/run-debug-session-tests
Open

Add Run and Debug session state regression tests#14736
Sean McManus (sean-mcmanus) wants to merge 3 commits into
mainfrom
seanmcm/devbox2-wsl/agent146/run-debug-session-tests

Conversation

@sean-mcmanus

Copy link
Copy Markdown
Contributor

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.

This PR was investigated and created by GitHub Copilot in VS Code. Any message starting with ✨Copilot: was sent by Copilot.

Validation

  • yarn compile
  • DISPLAY=:0 yarn ts-node -T .scripts/test.ts --scenario=SingleRootProject (56 passing)
  • Removed the production onDidOpenTextDocument listener as a reversible mutation; the new language-transition test failed because buildAndDebugIsSourceFile remained false after switching back to C++, then passed after restoration.

Context

The follow-up was requested in the review discussion on #14719.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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.

@sean-mcmanus
Sean McManus (sean-mcmanus) marked this pull request as ready for review September 3, 2026 20:34
@sean-mcmanus
Sean McManus (sean-mcmanus) requested a review from a team as a code owner September 3, 2026 20:34
@sean-mcmanus

Copy link
Copy Markdown
Contributor Author

✨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.

@8prashant Prashant Kumar Rai (8prashant) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

3 participants