Visual Studio 2008 Hangs When Debugging ASP.NET App
January 11th, 2010I’ve been doing some work with ASP.NET MVC but was having periodic issues with Visual Studio 2008 hanging (freezing / becoming unresponsive) when I tried to run my web application with debugging. The problem only occurred with a specific web project.
I tried deleting the Temporary ASP.NET Files (%userprofile%\AppData\Local\Temp\Temporary ASP.NET Files) but that did not solve the problem.
I tried deleting the obj folder. No luck.
I tried waiting it out one evening. I eventually feel asleep and when I awoke sometime in the middle of the night, my web app was happily waiting for input and Visual Studio debugging was completely responsive. That proved to be a temporary salve.
The problem resurfaced again a few days later and I finally figured out the problem with my uncooperative debugger. I have a folder containing approximately 20,000 images that are not included in the Visual Studio web project but are sitting in a directory in the web site. I had turned on "Show All Files" in Solution Explorer to add some script files into the project. When "Show All Files" is off, F5 (Start Debugging) works like champ. When "Show All Files" is on, Visual Studio becomes unresponsive. In reality it is not "frozen" but simply taking a very long time to process those 20,000 image files.
Mystery solved.


February 8th, 2010 at 5:42 am
hi thx!! That finally solved my problem – did look everywhere and just was not able to debug a solution – nothing int it… Every other solution was just fine and that did drive me crazy – on all other developers machines everything was fine.
thx!
February 23rd, 2010 at 1:15 pm
Hi,
Unfortunately it’s not that easy, this problem still occurs in a newly created WebApplicationProject with no other files than default for the project, if i turn on “Show All Files” it still hangs, so it doesn’t seem to have any relation to whether or not you have some 20,000 files or just one.
But still, this is somewhat a know bug in Visual Studio 2008, why no fix has been introduced I have no idea. This was even know long before VS2008 SP1, but SP1 didn’t fix it.
June 8th, 2010 at 1:56 pm
HI, thanks alot this solved my problem