I get the following error pretty regularly when compiling in Visual Studio and running my web application:

"Unable to start debugging on the web server. The web server did not respond in a timely manner. This may be because another debugger is already attached to the web server."

Normally this is after having debug the application once already. From the command line I run "iisreset /restart" and it fixes the problem.

How do I prevent this from happening in the first place?

+2  A: 

It sounds like you are probably hitting F5 in Visual Studio when you receive this error?

There are a few things you can try. The easiest is to hit the Stop button before hitting F5. Optionally, when you are finished debugging and starting to make changes you can go to the Debug menu and choose either Stop Debugging or Terminate All.


It sounds like something is eating up your web server's resources. Perhaps you have some resources (file handlers, wcf proxies) that are being opened and not closed? I've had this happen to me specifically when I was not closing WCF client proxy connections.

The problem is not necessarily that you have a debugger attached, but only that the web server is not responding in a timely manner. Note that the message says "This may be because another debugger is attached".

Brad Tutterow
+2  A: 

We use another way of debugging, we never use F5 anymore.

We use a macro kind of like: (Which we bound to F6).

This way you simply attach the debugger to IIS. It's (depending on project size) much quicker to make you changes, compile a single project that you changed and attach the debugger again.

+2  A: 

I find that this happens if I'm debugging with Firefox as my browser. When I exit Firefox the VS2005/8 debug session doesn't terminate. I have not found a solution for this (yet).

If this is what's happening with you then a quicker solution than running iisreset is to hit Shift-F5 when in Visual Studio and this will terminate the current debug session. You can then hit F5 and this will start a new debug session.


Dell Dimension 5621 - Win XP SP2 VS Studio 6.0 & 2008. We support ASP pages.

Usually I have had no problems using Visual Studio 2008 debugger with ASP pages from VStudio 6.0. In fact, up until last week, worked great. I was actually commenting to boss week ago wish that debugger had been around when VS 6.0 came out 10 years or so ago.

Then the system degraded. Started getting crashes with Debugger. Thought perhaps might be symantec AV. So I disabled those services. Now, when a bug happens, the debugger loads and ask me if I want to attach to dllhost.exe to debug.

You can attach or say no. If you attach, the system will debug; however, upon exiting will crash devenv.exe and kill most of the time the debugger and VS 6.0 sometimes which is annoying when your editing script based code to say the least.

Similiar to this issue this user reported here:


AppName: devenv.exe AppVer: 9.0.30729.1 AppStamp:488f2b50

ModName: vsdebug.dll ModVer: 9.0.30729.1 ModStamp:488f2c04

fDebug: 0 Offset: 0001f1c2

This system did not exhibit these issues up until about a week ago. As far as we are aware, there have been no changes to this system. Scanned with several AV programs as well.

When attaching to debugger:

Attaching to this process can potentially harm your computer. If the information below looks suspicious or you are unsure, do not attach to this process.

Name: C:\Windows\system32\dllhost.exe

User: \IWAM_

Do you wish to attach to this process?

Attach Don't Attach.

As far as I know nothing has been done to this system. We've scanned with AV programs and clean. I would think if this were a virus the debugger would never even fire up and/or the dllhost.exe would be reporting from the wins directory like I've read about dllhost.exe viruses.

Any suggestions would be helpful. Thank you.

+1  A: 

If you have a lot of break points this will slow the debugging process down, so remove unneeded break points and close the Autos window this will solve your problem


YES Same Problem here please solve my problem. :(


You might have some not-so-well-behaved plugin installed in your VS environment. Check this comment here.


The issue is normally there when an another instance of iexplore is still running. I used to have the issue when my IE crashes but I can still see it in the Task Manager. Once you "End Process" everything is back to normal :)


This answer will only apply if you are running your solution through IIS. You will know if this applies to you IF you open up your website/project by doing the following: From within visual studio-->Open Website--> Local IIS -->Select your project

This error Kicked my butt for 4 hours but finally i found an answer. I first attempted the iisreset /restart. This seemed to slightly help but still received the same error.

What worked for me was going (xp machine) to add/remove programs --> Add/Remove Windows Components--> Click on IIS--> Click on "Details". Be sure to have Front Page Extensions installed if you are debugging through IIS.

Skylar Hayes