Im trying to debug a .net core console application in visual studio 2019 and WLS2. The console application requires a command line argument at startup.
This my launchSettings.json
{
"profiles": {
"ConsoleApp": {
"commandName": "Project",
"commandLineArgs": "--s",
},
"WSL 2": {
"commandName": "WSL2",
"commandLineArgs": "--s",
"distributionName": ""
}
}
}
Starting the debug session with "ConsoleApp" profile the application console get the argument "--s" as expected, but executing the debug in WSL with "WSL 2" profile I get the following message:
Unknown option: --s
.NET Core SDK (3.1.404)
Usage: dotnet [runtime-options] [path-to-application] [arguments]