ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
860 stars 279 forks source link

Debug launch configurations don't take into account AppHosts #1691

Open baronfel opened 2 years ago

baronfel commented 2 years ago

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:

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

Krzysztof-Cieslak commented 2 years ago

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

baronfel commented 2 years ago

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

Krzysztof-Cieslak commented 2 years ago

What's the status here?

baronfel commented 2 years ago

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.