VS code 偵錯器無法在 Ubuntu 作業系統上執行 C# 程式

VS code 偵錯器無法在 Ubuntu 作業系統上執行 C# 程式

我是 Visual Studio Code 的新手,我將其安裝在我的 Ubuntu 電腦上並安裝了偵錯器。我可以使用“donnet run”命令正常運行我的程式。我透過新增以下內容來配置偵錯器:`"csharp.fallbackDebuggerLinuxRuntimeId": "ubuntu.16.10-x64" 到 settings.json 文件,並將 launch.json 修改為指向我的 dll,如下所示

{
        "name": ".NET Core Launch (console)",
        "type": "coreclr",
        "request": "launch",
        "preLaunchTask": "build",
        "program": "${workspaceRoot}/bin/Debug/netcoreapp1.1/Code.dll>",
        "args": [],
        "cwd": "${workspaceRoot}",
        "stopAtEntry": false,
        "console": "internalConsole"
    }

現在我在螢幕上看到了這個 在此輸入影像描述

有任何想法嗎?

答案1

我發現了問題並修復了它是一個語法問題

{
    "name": ".NET Core Launch (console)",
    "type": "coreclr",
    "request": "launch",
    "preLaunchTask": "build",
    "program": "${workspaceRoot}/bin/Debug/netcoreapp1.1/Code.dll>",
    "args": [],
    "cwd": "${workspaceRoot}",
    "stopAtEntry": false,
    "console": "internalConsole"
}

”>”這行的末尾是問題'它是原始程式碼的剩餘部分

相關內容