Open superman-lopez opened 3 years ago
@superman-lopez So this failure is occuring when VS Code is executing the build task defined in your .vscode/tasks.json. Could you try changing the "type" of the build task from "process" to "shell" and trying again on the latest VS Code?
@JoeRobich thanks, after changing the type to "shell" the debugger starts without issue. When I have the C# extension recreate the tasks.json, the default type in the new file is also "process".
I also currently experiencing this issue.
Making @JoeRobich 's suggested change from "process" -> "shell" allows the debugger to work as expected.
Regenerating the Tasks.json
with the extension, either via command pallete .NET generate assets
or automatically via detecting a new project still defaults to a tasks.json build of type "process". This requires each newly created tasks.json to be manually changed from "process" to "shell" for debugging to work.
> Executing task: dotnet build /home/riley/RiderProjects/ConsoleApp7/ConsoleApp7/ConsoleApp7.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <
execvp(3) failed.: Permission denied
The terminal process "dotnet 'build', '/home/riley/RiderProjects/ConsoleApp7/ConsoleApp7/ConsoleApp7.csproj', '/property:GenerateFullPaths=true', '/consoleloggerparameters:NoSummary'" failed to launch (exit code: 1).
Running the same command from the command line works fine. I'm assuming that's why changing the task type to shell
fixes the issue.
...
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/ConsoleApp7/ConsoleApp7.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
...
Version: 1.60.2 Commit: 7f6ab5485bbc008386c4386d08766667e155244e Date: 2021-09-22T12:01:43.795Z Electron: 13.1.8 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Linux x64 5.4.0-86-generic
.NET v5.0.401
@gregg-miskelly Do you know of any reason we couldn't update our asset generation to use "process"
instead of "shell"
? Some users do not seem to be able to debug without it, but I am uncertain if it would cause issues in other scenarios.
I am not an expert on this, but I would say:
I just started a brand new project, and still the same issue comes up for me.
In macOS Monterrey it is also happening. It is fixed using shell
instead of process
as type
In the vscode project below issue was posted:
Issue Type: Bug
When debugging a dotnet core 3.1 project through vscode I get the following error. I've checked that the project files have the correct permissions, have tried running vscode with sudo, and reinstalled vscode without fixing this issue.
Rolling back to the previous version [of vs code] fixed the issue, so this appears to be caused by the latest update.
https://github.com/microsoft/vscode/issues/123324
vscode developers suggest this issue is caused by C# extension, however the issue can resolved by downgrading vscode. Not sure how
execvp
is triggered, but this may be a cross project issue.