ionide-vscode-fsharp icon indicating copy to clipboard operation
ionide-vscode-fsharp copied to clipboard

Debug launch configurations don't take into account AppHosts

Open baronfel opened this issue 2 years ago • 4 comments

Describe the bug

When a project uses an apphost (commonly via <UseAppHost>true</UseAppHost>, which is set for some project types by default and may become the default in .net 7), the TargetPath (aka path/to/dll) isn't the correct entry point for debugging. In those cases, the app's exe (or matching binary file on non-Windows OS') should be launched instead.

The SDK provides two properties to help reduce the burden on integrations like ours:

  • RunCommand
  • RunArguments

We should start collecting those from proj-info, flow it up through FSAC, and use it here instead of the TargetPath directly.

baronfel avatar Apr 19 '22 14:04 baronfel

I think we already get both command and arguments from proj-info/FSAC - https://github.com/ionide/ionide-vscode-fsharp/blob/main/src/Core/DTO.fs#L216

Krzysztof-Cieslak avatar Apr 20 '22 11:04 Krzysztof-Cieslak

Whew, that's good news :) That should make this a lot easier to plumb through.

baronfel avatar Apr 20 '22 13:04 baronfel

What's the status here?

Krzysztof-Cieslak avatar Jul 12 '22 12:07 Krzysztof-Cieslak

Gotta do a little bit of validation to make sure those values do as expected with different TFM, RIDs, and UseAppHost msbuild properties - those have a direct impact on the values calculated.

baronfel avatar Jul 12 '22 12:07 baronfel