dotnet / project-system

The .NET Project System for Visual Studio
MIT License
967 stars 386 forks source link

Debugger launch env variable doesn't work if child process debugging tool installed #2752

Closed clairernovotny closed 4 years ago

clairernovotny commented 7 years ago

If I have a launchSettings of:

{
  "profiles": {
    "test.harness": {
      "commandName": "Executable",
      "executablePath": "$(VSINSTALLDIR)\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe",
      "commandLineArgs": "test.harness.dll /ListTests /testadapterpath:\"$(SolutionDir)\\src\\xunit.runner.visualstudio\\bin\\$(Configuration)\\net452\"",
      "workingDirectory": "$(SolutionDir)\\test\\test.harness\\bin\\$(Configuration)\\net452"
    }
  }
}

That doesn't work if the VS Child Process Debugging Extension is installed.

To repro:

Next to the solution file, have the following xml file called theSolution.ChildProcessDbgSettings

<?xml version="1.0" encoding="utf-8"?>
<ChildProcessDebuggingSettings IsEnabled="true" xmlns="http://schemas.microsoft.com/vstudio/ChildProcessDebuggingSettings/2014">
  <DefaultRule EngineFilter="[inherit]" />
</ChildProcessDebuggingSettings>

It launches correctly (though won't do anything without the rest of the args)

Now install https://marketplace.visualstudio.com/items?itemName=GreggMiskelly.MicrosoftChildProcessDebuggingPowerTool

Same thing fails. Even without any mixed mode debugging, just the presence of the extension seems to break things. Looks like the $(VSINSTALLDIR) isn't resolved.

/cc @gregg-miskelly

Pilchie commented 6 years ago

Also tagging @BillHiebert, but I'm not sure what project-system should do here. @gregg-miskelly?

clairernovotny commented 6 years ago

I haven't tested this, but shouldn't this work in 15.5 now since there's now a lauchSettings option for the native debugger?

gregg-miskelly commented 6 years ago

What error does the launch fail with?

davkean commented 4 years ago

Going to close this out, @onovotny if you are still encountering this - can you Report a Problem and I can route to the debugger tem.