我已经打开了一个窗口与我正在调试的网站。我不需要VS为我启动另一个每当我需要调试。
有没有办法阻止这种行为?
我已经打开了一个窗口与我正在调试的网站。我不需要VS为我启动另一个每当我需要调试。
有没有办法阻止这种行为?
当前回答
在ASP中。Net 5项目现在可以为每个启动配置文件设置。
打开文件launchsettings。在Startup Project Properties文件夹下添加"launchBrowser": false到你正在配置的配置文件中,例如:
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": false,
"environmentVariables": {
"Hosting:Environment": "Development"
}
}
}
其他回答
在ASP中。Net 5项目现在可以为每个启动配置文件设置。
打开文件launchsettings。在Startup Project Properties文件夹下添加"launchBrowser": false到你正在配置的配置文件中,例如:
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": false,
"environmentVariables": {
"Hosting:Environment": "Development"
}
}
}
当你第一次打开一个web/应用程序项目时,按Ctrl-F5,这是启动应用程序而不调试的快捷方式。然后,当您随后按下F5并启动调试器时,它将使用该IE实例。然后在Visual Studio中停止并启动调试,而不是关闭IE。
它在我的机器上工作。我正在使用内置的开发web服务器。不知道这有什么区别。
Firefox也将保持打开状态,因此您可以同时在其中一个或两个中进行调试。
您可以使用“附加到进程”功能,而不是按F5。
这也可以让你在已知的工作部分中导航,而不会在下面加载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.
看起来2022年的维密秀已经改变了,
现在它有一个专门的用户界面,
右键单击项目(在解决方案资源管理器中)>选择属性,然后遵循:-
“uncheck”选项不自动打开。
或者您可以单击菜单栏,调试>属性
你可以直接从那里到达第二步“启动配置文件”
或者一个捷径:
选择项目(在解决方案资源管理器中)并按Alt + Enter,然后从那里开始。