Skip to content

Support for launchSettings.json related options in DAP launch request #163

Open
@DRKV333

Description

@DRKV333

There were some other similar issues about this this topic, but I feel like those were entirely clear about the situation.

The Microsoft .NET debugger supports reading some debug settings from a launchSettings.json file. Specifically application URL, command line arguments and environment variables. This behavior of the DAP launch request configuration is documented here: https://code.visualstudio.com/docs/csharp/debugger-settings#_launchsettingsjson-support

It would be nice to also have support for this in netcoredbg. This feature exists in vscode to provide interoperability with Visual Studio, which reads this same file. The dotnet command line tool also supports launchSettings. I would also personally like to use launchSettings to keep things like command line arguments out of my main launch.json, since I don't want to check them in to source control.

The launch configuration contains two properties to control the launchSettings usage, launchSettingsFilePath and launchSettingsProfile. As far as I can tell, these are currently ignored by netcoredbg. launchSettingsFilePath determines where the json is, but defaults to {cwd}/Properties/launchSettings.json. launchSettingsProfile determines which section from the json file should be used, and defaults to the first one with "commandName": "Project". This way the launchSettings file usage is enabled by default, so implementing this exact mechanism here would also unfortunately be a behavioral change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions