如何在 VS 2017 上停止调试时自动停止浏览器关闭 [英] How to stop browser closing automatically when you stop debugging on VS 2017
问题描述
我正在试用新的 VS 2017 RC,想知道是否有人知道如何恢复以前的调试行为
I'm trying out the new VS 2017 RC and wondering if anyone knows how to get the previous debugging behavior back
在 VS 2015 中是这样的:
In VS 2015 it went like this:
按开始调试
- 网站在新的 Chrome 标签页中打开
- 按停止调试
- 网站仍处于打开状态,并且该网站仍在运行/活跃
现在是 2017 年:
Now in 2017:
- 按开始调试
- 网站在无法与任何其他 Chrome 窗口/标签对接的新窗口中打开
- 按停止调试
- 网站/Chrome 窗口关闭,无法继续使用该网站,除非我手动转到 Chrome 中的 localhost 窗口
2017年有可能转回2015年的风格吗?所以 Chrome/Website 窗口可以与其他 Chrome 窗口/选项卡对接,并且在您停止调试后保持打开状态?
Is it possible in 2017 to switch back to the 2015 style? So the Chrome/Website window can dock with other Chrome windows/tabs, and it stays open after you stop debugging?
此外,我发现新的 Chrome 窗口使用起来令人沮丧,因为它似乎没有任何可用的历史记录/内容.例如,我无法自动完成表单或网址,这在我尝试测试表单时非常烦人
Additionally, I find the new Chrome window frustrating to use, as it seems not to have any history/content available. E.g I can't autocomplete forms or urls, which is very annoying when I'm trying to test a form
推荐答案
Visual Studio 2017 版本 15.7 及更高版本 &Visual Studio 2019 再次改变了一切.
禁用以下复选框将允许您保持浏览器打开(停止调试后不会关闭)并打开另一个选项卡(而不是另一个窗口):
Disabling the following checkboxes will allow you to keep the browser open (doesn't close after stop debugging) and opens another tab (instead of another window):
工具 > 选项 > 调试 > 常规
- 禁用为 ASP.NET(Chrome、Edge 和 IE)启用 JavaScript 调试".
工具 > 选项 > 项目和解决方案 > Web 项目
- (Visual Studio 2017) 禁用关闭浏览器窗口时停止调试器".
- (Visual Studio 2019) 禁用浏览器窗口关闭时停止调试器,调试停止时关闭浏览器".
- (Visual Studio 2017) Disable "Stop debugger when browser window is closed".
- (Visual Studio 2019) Disable "Stop debugger when browser window is closed, close browser when debugging stops".
这篇关于如何在 VS 2017 上停止调试时自动停止浏览器关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!