调试的网站与谷歌浏览 [英] Debugging Websites with Google Chrome

查看:99
本文介绍了调试的网站与谷歌浏览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在写一个ASP.NET网站时,Visual Studio可以让我指定要用于调试哪种浏览器。我刚开始用MVC 3玩,我没有看到任何这样的选项。

When writing an ASP.NET website, Visual Studio allows me to specify which browser to use for debugging. I've just started playing with MVC 3 and I'm not seeing any such option.

使用MVC,调试发生在谷歌Chrome,除非我已经关闭了浏览器的Visual Studio不承认这是罚款。然后,我必须手动关闭调试器。

With MVC, debugging occurs in Google Chrome, which is fine except that Visual Studio doesn't recognize when I've closed the browser. I must then manually shut down the debugger.

有要么A)时,我已经停止在Chrome调试的网站都在Visual Studio调试器识别,或B)规定,即如果在调试时使用的方法是什么? (我preFER浏览网页的时候让Chrome设为我的默认浏览器。)

Is there a way to either A) have the Visual Studio debugger recognize when I've stopped debugging the website in Chrome, or B) specify that IE should be used when debugging? (I prefer to keep Chrome as my default browser when browsing the Web.)

推荐答案

当您调试Web应用程序时,Visual Studio只是附着于IIS进程(或开发服务器过程中,如果您使用的),并启动用正确的网址浏览器。浏览器甚至不知道你正在调试。随着IE,Visual Studio中进行一些额外的进程间巫毒IE关闭时检测;然而,其他浏览器并不知道这一机制的,只是做他们总是这样 - 直到用户关闭它显示该页面。所以,你的选择是:

When you debug a web application, Visual Studio simply attaches itself to the IIS process (or the development server process, if you're using that), and starts the browser with the correct URL. The browser doesn't even know you're debugging. With IE, Visual Studio performs some additional inter-process voodoo to detect when IE closes; other browsers however are unaware of this mechanism and simply do what they always do - display the page until the user closes it. So your choices are:


  • 居住的事实,你必须手动关闭浏览器

  • 重用的浏览器窗口(而不是运行从Visual Studio中的浏览器,使用附加到进程,并手动打开的页面)

  • 硬着头皮使用IE

这篇关于调试的网站与谷歌浏览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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