Visual Studio不打开新的浏览器实例

时间:2022-09-21 02:28:42

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)

当我尝试在windows 10上的visual studio 2017RC中运行一个web应用程序时,它会打开一个新的浏览器实例(在我的例子中是chrome)。我也尝试过使用ie浏览器,情况是一样的,浏览器没有登录,但是如果我手动运行chrome浏览器就会登录。如何防止visual studio在每次运行web应用程序时运行一个新的浏览器实例?当我按下run网站时,它应该和之前的应用程序在同一个窗口中打开(下一个选项卡)

3 个解决方案

#1


114  

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.

我发现关闭Javascript调试意味着在现有Chrome实例的新选项卡中打开站点。据我所见,Visual Studio调试不如Chrome的开发工具好,所以关闭这个功能对我来说不是问题。

Visual Studio不打开新的浏览器实例

UPDATE

更新

As of VS2017 15.7.1 this fix no longer works and I've found I've had to additionally uncheck Stop debugger when browser window is closed

从VS2017 15.7.1开始,这个修复不再有效,并且我发现当浏览器窗口关闭时,我不得不取消对停止调试器的检查

Visual Studio不打开新的浏览器实例

#2


4  

You can disable the website from being launched at all from the debug settings.

你可以从调试设置中禁用该网站。

Visual Studio不打开新的浏览器实例

Once the web application is running you can launch the website from the taskbar.

一旦web应用程序运行,您就可以从任务栏启动网站。

Visual Studio不打开新的浏览器实例

The "Browse With..." menu option appears to launch the website without running the debug session in VS2017 which might not be what you want.

“用…浏览”菜单选项似乎是在VS2017不运行调试会话的情况下启动网站,这可能不是您想要的。

#3


1  

I wanted to share the reason of the issue as well as the screen shot. The reason for which it opens a new window is because JS debugging is enabled. Chrome is launched with debugging enabled so a new instance is required. If you want to revert to the old behavior from Visual Studio 2015, you can do so but you would have to disable JS debugging. See below:

我想分享这个问题的原因以及截图。它打开新窗口的原因是启用了JS调试。Chrome的启动启用了调试,因此需要一个新的实例。如果希望恢复到Visual Studio 2015中的旧行为,可以这样做,但是必须禁用JS调试。见下文:

Visual Studio不打开新的浏览器实例

Original Source

原始来源

Original Discussion on Visual Studio Forum

在Visual Studio论坛上的原创讨论

#1


114  

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.

我发现关闭Javascript调试意味着在现有Chrome实例的新选项卡中打开站点。据我所见,Visual Studio调试不如Chrome的开发工具好,所以关闭这个功能对我来说不是问题。

Visual Studio不打开新的浏览器实例

UPDATE

更新

As of VS2017 15.7.1 this fix no longer works and I've found I've had to additionally uncheck Stop debugger when browser window is closed

从VS2017 15.7.1开始,这个修复不再有效,并且我发现当浏览器窗口关闭时,我不得不取消对停止调试器的检查

Visual Studio不打开新的浏览器实例

#2


4  

You can disable the website from being launched at all from the debug settings.

你可以从调试设置中禁用该网站。

Visual Studio不打开新的浏览器实例

Once the web application is running you can launch the website from the taskbar.

一旦web应用程序运行,您就可以从任务栏启动网站。

Visual Studio不打开新的浏览器实例

The "Browse With..." menu option appears to launch the website without running the debug session in VS2017 which might not be what you want.

“用…浏览”菜单选项似乎是在VS2017不运行调试会话的情况下启动网站,这可能不是您想要的。

#3


1  

I wanted to share the reason of the issue as well as the screen shot. The reason for which it opens a new window is because JS debugging is enabled. Chrome is launched with debugging enabled so a new instance is required. If you want to revert to the old behavior from Visual Studio 2015, you can do so but you would have to disable JS debugging. See below:

我想分享这个问题的原因以及截图。它打开新窗口的原因是启用了JS调试。Chrome的启动启用了调试,因此需要一个新的实例。如果希望恢复到Visual Studio 2015中的旧行为,可以这样做,但是必须禁用JS调试。见下文:

Visual Studio不打开新的浏览器实例

Original Source

原始来源

Original Discussion on Visual Studio Forum

在Visual Studio论坛上的原创讨论