Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop my Visual Studio from launching IE8 TWICE when I click "Start Without Debugging" (Ctrl-F5)?

I use Visual Studio 2008 primarily for web development, and there's one annoying behaviour which seems to have occurred ever since I upgraded to IE8 on my work PC:

When I set a start page for a web site or web application project, and then either click the "Start Without Debugging" icon in the toolbar or use the keyboard shortcut CTRL-F5, Visual Studio proceeds to start IE8 (my default web browser), but does so twice:

The first new window that IE8 opens has a tab saying "Connecting...", and it loads the about:blank page. Then, another new IE8 window opens also with a tab saying "Connecting...", and loads the start page I set in my project.

This is very annoying. Does anybody have any ideas what might be causing this and how to fix it?

Before somebody suggests it, I have already been working around this for a while by having Firefox as my default browser ;-) But, I'd like to use Visual Studio's javascript debugging capabilities with IE8 and so want IE8 as my default again, for now.


Additional information:

Using Process Explorer, I can see that both of the iexplore.exe processes were launched by the same parent process, Visual Studio 2008's devenv.exe.

The first iexplore.exe process has the following command line:

"C:\Program Files\Internet Explorer\IEXPLORE.EXE" -noframemerging -debug about:blank

The second iexplore.exe process, launched a few seconds later, has the following command line:

"C:\Program Files\Internet Explorer\IEXPLORE.EXE" -noframemerging -suspended -debug http://localhost/test/index.html

Then, I also tried Process Monitor. In the log, I can see two distinct "Process Create" events from devenv.exe on "C:\Program Files\Internet Explorer\IEXPLORE.EXE" ... a few seconds apart.

Interestingly, if I try the exact same thing (launch without debugging) with Visual Studio 2005 (instead of 2008), I only see a single process created with a command line of:

"C:\Program Files\Internet Explorer\IEXPLORE.EXE" about:blank

With 2005, visually it appears as if about:blank gets loaded first, and then the URL gets loaded by that same browser process in the same tab as about:blank, overwriting it.

One other thing I notice different: In the VS2005 Process Monitor log, it shows a lot of reading of the file "C:\WINDOWS\system32\ieframe.dll", but the same doesn't show in the VS2008 Process Monitor log. (ieframe.dll contains the type library for some COM objects related to Internet Explorer.) So, the way VS2005 launches and controls IE could be different than what VS2008 does.

AND LAST, this is weird: In VS2008, if I click "Start Without Debugging", I get the two windows. But, if in Solution Explorer I instead right-click my web site project or any HTML file in it and choose "View in Browser", I get only the single window. Why the difference between "Start Without Debugging" and "View in Browser"?

like image 361
Chris W. Rea Avatar asked Jun 19 '09 13:06

Chris W. Rea


5 Answers

Hrm... very odd. If you use SysInternal's Process Monitor, can you see if the second IE window was launched by the first, or if Visual Studio owns them both? That might help pinpoint where the problem lies.

Beyond that, next thing to try is disabling most browser addons, to see if that makes a difference. Lastly, try using Tools / Internet Options / Security to enable Protected Mode for the Intranet and Trusted Sites zones.

like image 53
EricLaw Avatar answered Nov 20 '22 13:11

EricLaw


Thanks for pointing me to the add-on's. This behavior was very annoying indeed. On my computer it is disappearing only - and only then - when disabling the Windows Live Toolbar add-on. Enable the same add-on and the problem will reappear!

like image 43
user150301 Avatar answered Nov 20 '22 14:11

user150301


http://dpotter.net/Technical/2009/05/upgrading-to-ie8-breaks-debugging-with-visual-studio-2005/

like image 37
Oleksey Avatar answered Nov 20 '22 12:11

Oleksey


Sorry for the duplicate answer, but disabling Live toolbar is really working out great for me, I wanted to up the answer from sjerp but since I lack reputaion I thought it was worth while repeating it.

like image 1
cjensen Avatar answered Nov 20 '22 13:11

cjensen


Disable Live toolbar when using IE8 and Microsoft Visual Web Developer 2008 Express Edition if you are getting two browser instances is indeed right

like image 1
Rat1960 Avatar answered Nov 20 '22 13:11

Rat1960