简体   繁体   English

无法在 VSCode 中调试 ASP.NET Core Webapp 6.0

[英]Can't debug ASP.NET Core Webapp 6.0 in VSCode

Earlier, I created my ASP.NET Core web app using the 6.0 preview build, and I was able to debug it in VSCode.早些时候,我使用 6.0预览版创建了我的 ASP.NET Core web 应用程序,并且能够在 VSCode 中对其进行调试。

Then, I upgraded my app to the final 6.0 release a week ago.然后,我在一周前将我的应用程序升级到了最终的 6.0 版本。 Since then I could no longer debug it.从那以后,我再也无法调试它了。 The debugger starts and stops immediately within 1 second.调试器在 1 秒内立即启动和停止。

I'm on Mac OS, using the release build of dotnet core 6.0.我在 Mac OS 上,使用 dotnet core 6.0 的发布版本。

Here's my launch.config entry for debugging:这是我用于调试的launch.config条目:

{
  "name": ".NET Core Launch (web)",
  "type": "coreclr",
  "request": "launch",
  "preLaunchTask": "Build:Api",
  "program": "${workspaceFolder}/api/bin/Debug/net6.0/api.dll",
  "args": [],
  "cwd": "${workspaceFolder}",
  "stopAtEntry": false,
  "serverReadyAction": {
    "action": "openExternally",
    "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
  },
  "env": {
    "ASPNETCORE_ENVIRONMENT": "Development"
  }
},

I have checked and all my extensions are up-to-date.我已经检查过了,我的所有扩展都是最新的。

Is there a way I can at least see the log to figure out why the debugger fails to start?有没有办法至少可以查看日志来找出调试器无法启动的原因?

I'm assuming you may need to install the appropriate .net 6.0 sdk我假设您可能需要安装适当的 .net 6.0 sdk

https://dotnet.microsoft.com/en-us/download/dotnet/6.0 https://dotnet.microsoft.com/en-us/download/dotnet/6.0

Ray H.雷·H。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM