Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 debug hangs on Chrome

Today I received a suite of Microsoft updates on my PC. Following these updates, Chrome began intermittently hanging when I started debugging in Visual Studio 2013. I have Windows 8.1 Enterprise, 64-Bit, and Visual Studio 2013 Ultimate with Update 4. On my workstation, Chrome is version 39.0.2171.95 m.

Debugging via F5 or Ctrl+F5 (start without debugging) makes no difference, Chrome still intermittently hangs. This occurs on multiple web application projects, and even with one that is not connected to any external database. Visual Studio 2013 works fine when I debug with Internet Explorer, Firefox, and Safari. One of the sites is set up in IIS locally on my workstation, and I can successfully browse to the site in Chrome. But if I launch that same site via Visual Studio 2013, the browser just hangs. I cleared history and cookies in Chrome. Rebooting doesn't correct this.

What's especially annoying about this is that the problem is intermittent. If I cycle through several browsers in the Visual Studio debugger, on occasion Chrome will work. In the past it's always worked. Given that my PC received about 30 updates today, I suspect the problem is tied to one of those changes.

Is anyone else experiencing this Chrome problem in Visual Studio 2013, and if so what is the fix? Thanks.

=== Edit 1/9/2015 ===

After troubleshooting this further I'm able to consistently replicate the issue, and now have a workaround for Chrome. I've been running Visual Studio as an Administrator (elevated mode).

To replicate this do the following:

  1. Run Visual Studio 2013 as an Administrator.
  2. Close all instances of Chrome.
  3. Select the Chrome browser in the Visual Studio ribbon and launch the site.
  4. Chrome will hang indefinitely.

By comparison, you can follow the above steps for other browsers (IE, Firefox, and Safari), and they will successfully work without hanging.

There are two workarounds. The first: Avoid running Visual Studio 2013 as an Administrator, and you will be able to successfully launch Chrome from VS. Here are steps for the second workaround.

  1. Run Visual Studio as an Administrator.
  2. Open an instance of Chrome before you launch the site in Visual Studio.
  3. The site should successfully open.

My theory is that when Visual Studio attempts to launch a new browser instance, if it detects that Chrome is not running, it tries to launch Chrome in elevated mode. And this causes Chrome to hang. That's just my theory. Someone with more knowledge about the internal workings of Visual Studio or Chrome will have more insight into this.

Note, this is a workaround. I don't consider it a solution, because this just addresses functionality that used to work.

like image 672
Ken Palmer Avatar asked Dec 30 '14 22:12

Ken Palmer


1 Answers

I too experienced it however I found a solution like open only single tab in chrome to debug, as soon as you close other tabs, vs will start running smooth.

like image 59
Shamnani Kamlesh Avatar answered Nov 17 '22 17:11

Shamnani Kamlesh