1

我使用visual studio codeC#版本1.10.0-beta1的插件。 当我尝试调试之交,我得到错误:调试visual studio代码时launch.json中'程序'的错误

launch: launch.json must be configured. Change 'program' to the path to the executable file that you would like to debug.

我用ubuntu 17.04 我的设置:

{ 
    "window.menuBarVisibility": "toggle", 
    "csharp.fallbackDebuggerLinuxRuntimeId": "ubuntu.16.10-x64", 
    "omnisharp.useMono": true, 
} 

我的配置launch.json

{ 
     "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, 
     "console": "internalConsole" 
    } 

,我应该写什么:"program":

回答

0

首先,确保你已经构建了你的程序。然后,转到程序的根目录,在Debug文件夹下找到您的目标框架和项目名称。

例如,你已经建立一个名为控制台1一个Hello World程序和您的.netcore版本是1.1.0,你会改变 “计划”:

“$ {} workspaceRoot /斌/调试//”

“程序”:

“$ {workspaceRoot} /bin/Debug/netcoreapp1.1/console1.dll”。

如果已经安装了dotnet核心调试器,现在就可以开始调试了。

相关问题