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核心調試器,現在就可以開始調試了。

相關問題