我已经打开了一个窗口与我正在调试的网站。我不需要VS为我启动另一个每当我需要调试。
有没有办法阻止这种行为?
我已经打开了一个窗口与我正在调试的网站。我不需要VS为我启动另一个每当我需要调试。
有没有办法阻止这种行为?
当前回答
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.
其他回答
Joao Costa的答案同样适用于。net core 2项目。
launchsettings。json——> "launchBrowser": false
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": false,
"environmentVariables": {
"Hosting:Environment": "Development"
}
}
}
当你第一次打开一个web/应用程序项目时,按Ctrl-F5,这是启动应用程序而不调试的快捷方式。然后,当您随后按下F5并启动调试器时,它将使用该IE实例。然后在Visual Studio中停止并启动调试,而不是关闭IE。
它在我的机器上工作。我正在使用内置的开发web服务器。不知道这有什么区别。
Firefox也将保持打开状态,因此您可以同时在其中一个或两个中进行调试。
.NET核心Web Api项目的更新答案…
右键单击项目,选择“属性”,转到“调试”,取消“启动浏览器”复选框(默认启用)。
您可以右键单击您的项目,然后选择属性,在调试选项卡上,您应该取消选中启动浏览器复选框。
您可以使用“附加到进程”功能,而不是按F5。
这也可以让你在已知的工作部分中导航,而不会在下面加载VS调试器。