-
Notifications
You must be signed in to change notification settings - Fork 28.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode Unable to Recognise default "program" in launch.json #10040
Comments
@sebasijan do you still see this issue with vscode 1.4? If you keep using the ${workspaceRoot} do you end in this situation every time you try to start debugging? |
@isidorn After trying the above steps in |
I'm getting this exact same error on v1.7.1 on macOS 10.11 (El Capitan). I'm extremely new to macOS so maybe I don't have something configured correctly. When I execute |
@gmsDave make sure your program attribute is launch.json is has a correct absolute paht - or is using ${workspaceRoot}. If the problem still occurs I recommend to file it to the C# extension since the launching of your program is done on the extension side |
It was set to Correction: setting the exact path does fix the issue. I originally changed it on the wrong configuration - the web one, not the console one. D-oh! Such a rookie mistake. The correct value should be |
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>",
"args": [],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": false
}, launch.jsonFor Dear coordinator, the real issue here is the project kick-starting process is way too tedious for a console project.
What we really want:
I wonder if it is possible. Is this the wrong place to report the issue? |
@qiansen1386 please file this feedback against the c# extension as this can be improved on their side |
@isidorn Thanks |
For anyone still hitting this issue.
For those interested there is an issue tracking this behavior. |
Steps to Reproduce:
Create a new Console Application using the powershell script:
The folder structure and code is created, and it is opened in VSCode. The application executes and prints "Hello World!" to the PowerShell terminal.
PowerShell Output:
Debug
orCtrl
+Shift
+D
, then pressF5
.NET Core
as the environment -launch.json
is opened - then pressF5
againConfigure Task Runner
- select.NET Core
-tasks.json
is openedF5
to launchlaunch.json
Program
is given by :"${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>"
.dll
resolves the issue, butVSCode
complains that :The text was updated successfully, but these errors were encountered: