Fix attachVS when used for debugging integration tests#15451
Merged
Conversation
Member
Author
|
copilot is working on documenting this. |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes how integration tests resolve and pass the AttachVS executable path so VS can auto-attach when debugging vstest.console from data-driven integration tests.
Changes:
- Add a project reference to
AttachVSfrom the TestUtilities project so the executable can be built/copied alongside tests. - Set
VSTEST_DEBUG_ATTACHVS_PATHinIntegrationTestBasewhen debug settings are enabled, pointing toAttachVS.exein the calling assembly’s output directory.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/Microsoft.TestPlatform.TestUtilities/Microsoft.TestPlatform.TestUtilities.csproj | References AttachVS so the executable can be produced/available for integration-test debugging. |
| test/Microsoft.TestPlatform.TestUtilities/IntegrationTestBase.cs | Injects VSTEST_DEBUG_ATTACHVS_PATH based on the calling assembly’s output location. |
Youssef1313
approved these changes
Mar 9, 2026
Copilot AI
added a commit
that referenced
this pull request
Mar 9, 2026
Co-authored-by: nohwnd <[email protected]>
nohwnd
added a commit
that referenced
this pull request
Mar 9, 2026
* Initial plan * Apply PR #15451 fix and document integration test debugging Co-authored-by: nohwnd <[email protected]> * Apply suggestions from code review * Update docs/contribute.md Co-authored-by: Copilot <[email protected]> * Update docs/contribute.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: nohwnd <[email protected]> Co-authored-by: Jakub Jareš <[email protected]> Co-authored-by: Copilot <[email protected]>
This was referenced May 26, 2026
Merged
Merged
This was referenced Jul 6, 2026
Open
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.
Description
You can specify

DebugVSTestConsole = trueand similar values to data source attributes to debug tests in integration tests, avoiding manually juggling the projects etc.This fixes how we resolve attach vs to automatically attach back to VS.