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

查看:827
本文介绍了发生一个或多个错误无法启动调试适配器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.

推荐答案

问题是从我上次执行开始的进程仍在运行.当我们使用配置文件项目启动该项目时,它将启动一个新过程,您可以看到如上图所示,有一个新的 Debug console窗口.

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天全站免登陆