Skip to content

Auto-deploy debug adapter when building CppTests#1610

Draft
gregg-miskelly wants to merge 2 commits into
microsoft:mainfrom
gregg-miskelly:DeployForCppTesting
Draft

Auto-deploy debug adapter when building CppTests#1610
gregg-miskelly wants to merge 2 commits into
microsoft:mainfrom
gregg-miskelly:DeployForCppTesting

Conversation

@gregg-miskelly

@gregg-miskelly gregg-miskelly commented Jul 10, 2026

Copy link
Copy Markdown
Member

Why is this change being made

This PR fixes the way we deploy the debug adapter for CppTests so that you don't need to rerun CI-Build.ps1/.sh between test iterations. This way you can make a code change, then run a test from the command line, from Test Explorer in Visual Studio, or the Testing panel in VS Code.

Summary of changes

  • Removed steps from CI-Build.ps1/.sh to publish OpenDebugAD7
  • Added targets to CppTests.csproj to deploy the debug adapter
  • Added project references so that building CppTests.csproj will ensure all the other projects are built
  • Removed solution build dependencies from the .sln files since they are now in the .csproj files
  • Added code to copy config.xml in test/CppTests project directory
  • Updated documentation from the changes

Unrelated, but I also added src/MIDebugEngine-Unix.sln as the default solution in VS Code

Testing

  • .NET CLI: ran git clean, copied in the correct config.xml, and verified I could run a test using dotnet test
  • Visual Studio: ran git clean, copied in the correct config.xml, and verified I could run a test
  • Visual Studio: made a change to DebuggedProcess.cs, then rerun a test and verified my new code was running
  • Visual Studio Code: cloned the repo into WSL, copied in the correct config.xml, opened the workspace and verified I could run tests from the Testing pannel.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR moves deployment of the OpenDebugAD7 debug adapter for test/CppTests into the CppTests.csproj build, so local/CI test iterations don’t require rerunning the CI build scripts to refresh the adapter staging layout.

Changes:

  • Add MSBuild targets in CppTests.csproj to stage debug adapter outputs under bin/DebugAdapterProtocolTests/<Configuration>/extension/debugAdapters and copy config.xml when present.
  • Replace solution-level build ordering with project-level dependencies (notably for MakePIAPortable/PIA generation) and remove some .sln dependency entries.
  • Remove OpenDebugAD7 publishing/staging from CI-Build.ps1/.sh and update docs; set VS Code default solution.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/CppTests/CppTests.csproj Adds adapter deployment targets, project build dependencies, and config.xml copy behavior.
src/MIDebugEngine.sln Removes MakePIAPortable solution dependency ordering entry.
src/MIDebugEngine-Unix.sln Removes MakePIAPortable solution dependency ordering entry.
src/MakePIAPortable/MakePIAPortable.csproj Adds a project reference to ensure MakePIAPortableTool builds first.
eng/Scripts/CI-Build.sh Removes OpenDebugAD7 publish/staging step.
eng/Scripts/CI-Build.ps1 Removes OpenDebugAD7 publish/staging and simplifies parameters.
docs/RunningCppTests-outside-of-VS-for-AI.md Updates build invocation + config.xml placement guidance.
docs/Building-outside-of-VS-for-AI.md Updates build script behavior description (no longer publishes OpenDebugAD7).
build/Debugger.PIAs.Portable.Packages.settings.targets Adds MakePIAPortable build dependency for projects importing PIAs.
.vscode/settings.json Sets default solution for VS Code.
.gitignore Ignores test/CppTests/config.xml.

Comment thread test/CppTests/CppTests.csproj Outdated
Comment thread .vscode/settings.json
- Add ProjectReference items to CppTests.csproj for OpenDebugAD7, MIDebugEngine, and WindowsDebugLauncher to ensure they build as dependencies
- Add DeployDebugAdapter MSBuild target that copies built debug adapter files to the extension/debugAdapters folder expected by the test framework
- Add fast up-to-date check support for Visual Studio incremental builds
- Support config.xml in test/CppTests project directory (auto-deployed to output)
- Remove vscode publish section from CI-Build.ps1 and CI-Build.sh (now handled by the MSBuild target in CppTests.csproj)
- Update Testing-OpenDebugAD7.md with new workflow and per-platform sections
- Add test/CppTests/config.xml to .gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants