5

Is there a way to just point ".vscode/launch.json" to a profile defined in my "Properties/launchSettings.json" so I don't need to duplicate those values?

I need to support several different editors and also run from command line with

dotnet run --launch-profile="myprofile"
Vega
  • 27,856
  • 27
  • 95
  • 103
red888
  • 27,709
  • 55
  • 204
  • 392
  • Does this answer your question? [Visual Studio Code: run Python file with arguments](https://stackoverflow.com/questions/43704747/visual-studio-code-run-python-file-with-arguments) - its VsCode generic and applies to C# the same as Python or any other language. – Jeremy Thompson Mar 30 '22 at 23:17
  • This is .net specific. launchSettings.json is read by .net – red888 Mar 31 '22 at 13:56

1 Answers1

5

This is in the docs under debugger-launchjson.md > launchSettings.json support:

"launchSettingsProfile": "${workspaceFolder}/<Relative-Path-To-Project-Directory/Properties/launchSettings.json"
KyleMit
  • 30,350
  • 66
  • 462
  • 664
red888
  • 27,709
  • 55
  • 204
  • 392