问题描述
当我尝试在 Windows 10 上的 Visual Studio 2017RC 中运行 Web 应用程序时,它会打开一个新的浏览器实例(在我的例子中是 chrome).我也尝试过使用 Internet Explorer,情况相同,浏览器未登录,但如果我只是手动运行 chrome,它已登录.如何防止 Visual Studio 在我每次运行 Web 应用程序时运行新的浏览器实例?当我按下运行网站时,它应该在与上一个应用程序相同的窗口中打开(只是下一个选项卡)
when I try to run a web application in visual studio 2017RC on windows 10, it opens a new browser instance(in my case chrome). I've tried also with internet explorer, situation is same, and browser not signed in, but if I just manually run chrome it is signed in. How to prevent visual studio to run a new browser instance on each time I run web application? When I press run website it should be opened in same window as previous application(just next tab)
推荐答案
我发现关闭 Javascript 调试意味着网站会在现有 Chrome 实例的新标签页中打开.根据我所见,Visual Studio 中的调试不如 Chrome 的开发工具好,所以关闭它对我来说不是问题.
I've discovered that Turning off Javascript debugging means that sites open in a new tab of an existing Chrome instance. From what I've seen the in Visual Studio debugging is not as good as Chrome's dev tools so turning this off is not an issue for me.
更新
从 VS2017 15.7.1 开始(在 VS2019 16.0.0 和 VS2022 17.0.0 PREVIEW 中仍然如此)此修复不再有效,我发现我必须另外取消选中 Stop debugger when browser窗口关闭
As of VS2017 15.7.1 (and still the case in VS2019 16.0.0 and VS2022 17.0.0 PREVIEW) this fix no longer works and I've found I've had to additionally uncheck Stop debugger when browser window is closed
这篇关于Visual Studio 不要打开新的浏览器实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!