发生一个或多个错误无法启动调试适配器 Visual Studio 2019 [英] one or more errors occurred failed to launch debug adapter Visual Studio 2019

查看:54
本文介绍了发生一个或多个错误无法启动调试适配器 Visual Studio 2019的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从今天早上开始,我的 Visual Studio 的行为非常奇怪.我收到错误一个或多个错误无法启动调试适配器";每当我运行项目时.

From today morning, my Visual Studio is behaving very strangely. I get the error "one or more errors occurred failed to launch debug adapter" whenever I run the project.

我运行我的项目配置文件,而不是在 IIS Express 配置文件中运行它.这是我的 launchSettings.json 文件.

I run my project profile instead of running it in the IIS Express profile. Here is my launchSettings.json file.

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:65498",
      "sslPort": 44318
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "<ProjectName>": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "https://localhost:5001;http://localhost:5000"
    }
  }
}

当我检查输出窗口时,这就是我得到的.

And when I check the Output window, this is what I get.

程序[22052] .exe"已退出,代码为 -1(0xffffffff).

The program '[22052] .exe' has exited with code -1 (0xffffffff).

我注意到的另一件事是打开了一个新的浏览器选项卡,其中没有任何 URL,只是一个 about:blank 页面.

Another thing I noticed is that a new browser tab is opened without any URL in it, just an about:blank page.

推荐答案

问题是从我之前的执行开始的进程仍在运行.当我们使用profile项目启动项目时,它会启动一个新的进程,你可以看到如上图所示有一个新的Debug console window.

The issue was that the process that got started from my previous execution was still running. When we start the project using the profile project, it will start a new process, and you can see that there is a new Debug console window as in the preceding image.

您可以关闭此窗口并再次运行您的项目,这将解决问题.您还可以启用在调试停止时关闭此进程的设置.为此,请转到工具,然后单击选项,选择调试,然后启用选项调试停止时自动关闭控制台.

You can just close this window and run your project again, and that will fix the issues. You can also enable a setting that will close this process when the debugging stops. To do that, go to Tools and then click on Options, select Debugging and then enable the option Automatically close the console when debugging stops.

如果您没有看到该选项,只需单击调试"菜单下的其他选项,然后等待内容加载,然后再次单击调试"菜单.有时它只是显示一个没有任何选项的空白屏幕.似乎是 Visual Studio 2019 中的一个错误.

If you don't see the option, just click on the other options under the Debugging menu, and wait for the contents to load, and then click on the Debugging menu again. Sometimes it was just showing a blank screen without any options. Seems like a bug in Visual Studio 2019.

另外,请确保关闭上次执行时打开的浏览器窗口.对我来说它被打开了,这就是为什么一个带有 about:blank 的新标签正在打开的原因.

Also, make sure to close the browser window that was opened from the last execution. For me it was opened, that is the reason why a new tab with about: blank was opening.

编码愉快!

这篇关于发生一个或多个错误无法启动调试适配器 Visual Studio 2019的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆