【发布时间】:2016-12-23 19:08:34
【问题描述】:
场景:
我正在尝试在 Sabayon Linux 下的 Visual Studio Code 上调试 asp.net 核心项目。当我按下 F5 时,我收到以下消息:
在命令面板中运行“调试:下载 .NET Core 调试器”或打开 .NET 项目目录以下载 .NET Core 调试器
打开命令面板并选择“调试:下载 .NET Core 调试器”什么都不做。
软件版本:
Sabayon linux 16.07
dotnet --version 1.0.0-preview2-003121
Visual Studio Code 1.4.0
VSC 1.3 的 C# 扩展
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/myproject.dll",
"args": [],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>",
"args": [],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "open"
},
"linux": {
"command": "xdg-open"
}
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceRoot}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command.pickProcess}"
}
]
}
【问题讨论】:
-
请尝试删除 ~/.vscode/extensions/ms-vscode.csharp-
中的整个 csharp 扩展目录,然后重新安装扩展。要查看调试器安装的状态,您可以查看输出面板(查看 -> 切换输出)并选择 coreclr-debug 选项以查看任何消息 -
我做了这些步骤,不幸的是结果相同。
coreclr-debug/install.log为空。此外,输出面板中没有coreclr-debug选项。安装 C# 扩展添加Omnisharp Log选项,但没有coreclr-debug。
标签: c# debugging visual-studio-code