我是 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"
}
这“>”这一行的末尾有一个问题,它是原始代码的遗留问题