【发布时间】:2020-03-26 15:14:47
【问题描述】:
我使用 Visual Studio Code 已经有一段时间了,但我无法调试任何 .NET 和 .NET Core 应用程序。我试过启动,附加到进程,但是当我运行任务时它什么也没做。 有一次,它确实将条的颜色从蓝色变为橙色一秒钟,然后又变回蓝色,所以我猜它试图做些什么,但即使在那之后也没有任何反应。我的同事们从来没有遇到过这个问题,这意味着我的编辑器一定有问题。 我也尝试过重新安装、删除配置、安装不同的版本,但总是会发生同样的事情。我现在很茫然,所以如果有人知道如何解决这个问题,我会很高兴。
编辑: 我已尝试重新安装omnisharp 扩展程序,但仍然无法正常工作。
这是我的 launch.json 代码:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/WebAPI/bin/Debug/netcoreapp2.2/WebAPI.dll",
"args": [],
"cwd": "${workspaceFolder}/WebAPI",
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]}
【问题讨论】:
-
尝试安装或重新安装omnisharp扩展。并分享您的启动配置。
标签: asp.net asp.net-core visual-studio-code vscode-settings vscode-debugger