Why can't I debug from Visual Studio 2005 after installing IE8?
Asked Answered
Z

3

32

I've just installed IE8 (final) and restarted. I can no longer debug Web Application Projects using Visual Studio 2005 on Windows Server 2003 Enterprise R2. I get the message "Internet Explorer cannot display the webpage" and then WebDev.WebServer.exe quits with no visible error message and nothing in the Event Viewer.

Does anyone have any ideas?

Things that haven't helped:

  • Adding localhost to trusted sites
  • Changing the port to 8080 or 80
  • Checking my hosts file (it's just got 127.0.0.1 localhost in it)

Things that have helped a bit:

  • Running (not debugging) with CTRL-F5, which works fine (unless you need to debug)
  • Changing the default Visual Studio browser to Firefox, which allows me to debug

My hosts file contains:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
Zealotry answered 19/3, 2009 at 17:24 Comment(1)
Thanks, I didn't realize it was IE8 that was causing the issue. I recently upgraded to Windows 7 when everything stopped working, so I thought it was related to that.Stephanestephani
Z
43

A colleague of mine was having similar issues and found this:

IE 8 has a feature called Loosely-Coupled Internet Explorer (LCIE) which results in IE running across multiple processes.

http://www.microsoft.com/windows/internet-explorer/beta/readiness/developers-existing.aspx#lcie

Older versions of the Visual Studio Debugger get confused by this and cannot figure out how to attach to the correct process. You can work around this by disabling the process growth feature of LCIE. Here's how:

  1. Open RegEdit
  2. Browse to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
  3. Add a dword under this key called TabProcGrowth
  4. Set TabProcGrowth to 0

Since you are running on Windows Server 2003, this is all you should need to do. If you run into the same problem on Vista or newer, you will also need to turn off protected mode.

Credit: Brad Sullivan, Program Manager, Visual Studio Debugger, MSFT

Source: http://social.microsoft.com/Forums/en-US/vsdebug/thread/e2c795cd-b7a0-4fad-b7c9-b1ca40d7302e

Zealotry answered 23/3, 2009 at 12:54 Comment(3)
Just a little addition for everyones information: Visual Studio 2008 Debugger can handle this feature.Galle
Was not necessary to turn off protected mode. Remember to close all instances of IE for the new registry setting to be picked up.Macrospore
This fix worked for me too. I am running Windows 7 Pro 64-bit and Visual Studio 2005.Benn
D
3

I recently had a similar issue after installing an update to Windows Vista. Basically the update changed the hosts file, which caused the same issue you describe.

Apparently, the entry in the hosts file needs to be prefixed by three colons, ie.:

:::1 localhost

For some reason the update to Vista changed this to two colons. I'm not sure if you have the same problem, but it sounds like it's worth checking out.

Densify answered 19/3, 2009 at 20:1 Comment(3)
Thanks, this seems to work. In my case there was no entry like that in the hosts file (see original post where I've shown my old hosts file) so I tried adding it and now everything works fine.Zealotry
:::1 is IPv6's version of 127.0.0.1Statampere
Unfortunately this fix has just stopped working, I'll have to un-accept the answer for now to see if anyone else has other ideas.Zealotry
P
2

If you run into this with IE8 and Visual Studio 2008, modify your hosts file and point the localhost to 127.0.0.1:

::1 localhost

127.0.0.1 localhost

Proverbial answered 15/4, 2009 at 21:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.