Visual Studio 2017 启动浏览器的新实例 [英] Visual Studio 2017 starts new instance of browser

查看:33
本文介绍了Visual Studio 2017 启动浏览器的新实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 Visual Studio 2017,它为 Web 应用程序启动了新的浏览器实例.我想在当前打开的浏览器中启动它,没有任何新实例(当我停止调试时关闭).这个设置在哪里?

I installed Visual Studio 2017 and it starts new instance of browser for web applications. I want to start it in the current opened browser, without any new instances (which closes when I stop debugging). Where is this setting?

推荐答案

这是 VS 2017 中的一项新功能的结果,该功能允许在 Chrome 中运行的 javascript 在 Visual Studio 中进行调试.您可以从

This is a consequence of a new feature in VS 2017 that allows javascript running in Chrome, to be debugged inside Visual Studio. You can turn the feature off from

工具 > 选项 > 调试 > 常规 > 为 ASP.NET 启用 JavaScript 调试

Tools > Options > Debugging > General > Enable JavaScript debugging for ASP.NET

此功能需要新的 Chrome 实例的原因是调试器连接需要使用特定的命令行开关启动 Chrome,该命令行开关只能在进程启动时应用,而不适用于当前正在运行的进程.

The reason this feature requires a new instance of Chrome, is that the debugger connection requires Chrome to be launched with a specific command-line switch that can only be applied at process start, not to currently running processes.

详细说明功能点击此处.

另一个有趣的注意事项是,使用 F12 打开 Chrome 的开发者控制台会产生副作用,即从浏览器中分离 Visual Studio 的调试器.

One other interesting note, is that opening Chrome's developer console, with F12, will have the side-effect of detaching Visual Studio's debugger from the browser.

这篇关于Visual Studio 2017 启动浏览器的新实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆