我已经打开了一个窗口与我正在调试的网站。我不需要VS为我启动另一个每当我需要调试。

有没有办法阻止这种行为?


当前回答

CTRL+ALT+ENTER如果你的修正是前端

http://blogs.msdn.com/b/webdev/archive/2013/06/28/browser-link-feature-in-visual-studio-preview-2013.aspx

其他回答

由于我的VS (Visual Studio Enterprise 2017)中没有上述选项,我不得不寻找其他选项。

以下是我的发现:

进入“工具->选项->调试”选项卡(通用),取消选中“为Asp启用JavaScript调试”。Net(Chrome和IE)。

I looked over the answers and didn't see the solution I found mentioned. If it was, my apologies. In my case, currently using Visual Studio 2015. In the solution explorer, right click on the Project file and click properties. Go to the Debug tab and this should have info for how you're launching "IIS Express or Web(DNX)" for the first two drop downs, and then there should be a checkmark box for "Launch URL:". Uncheck this option and your browser won't be automatically launched everytime you go to debug your application. Hope this helps someone out.

在ASP中。Net 5项目现在可以为每个启动配置文件设置。

打开文件launchsettings。在Startup Project Properties文件夹下添加"launchBrowser": false到你正在配置的配置文件中,例如:

"profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": false,
      "environmentVariables": {
        "Hosting:Environment": "Development"
      }
    }
}

VS 15.7.1工具→选项→项目和解决方案→Web项目→取消勾选关闭浏览器窗口时停止调试器。

There seems to be one case in which none of the above but the following helps. I'm developing a project for Windows Azure cloud platform and I have a web role. There is indeed a radio button Don't open page in Project -> {Project name} properties... as was pointed out by Pawel Krakowiak, but it has no effect in my case whatsoever. However, there is the main cloud project in solution explorer and there is the Roles folder under it. If I right click my web role in this folder and choose Properties, I get another set of settings and on the Configuration tab there is the Launch browser for flag, after unchecking it a new browser window is not opened on application start up.