9
votes

I'm trying to debug an ASP.NET web application from Visual Studio 2013, with IIS 7.5 on a Windows 7. The debugging process is extremely slow, taking about 60-90 seconds per page load. I've noticed that, while a page is loading, MSVSMON.EXE (Visual Studio Remote Debugging Monitor) stays on 25-30% CPU on my Quad Core machine, and I suspect that it is the culprit.

On another PC with Windows 8 and IIS 8.5, debugging is much, much faster with almost meaningless MSVSMON usage. I tried to mimic every single debugging settings for Visual Studio and IIS for the former machine, yet the debugging is still very slow and MSVSMON stills reaches high cpu usage.

Why is that so? What can I do to solve my problem and reduce that CPU usage?

3
Same for me but with "normal" Windows applications. - mmmmmmmm
Somewhere in the internet I read about someone who had this kind of problems after running the Profiler. Since I also use the profiler from time to time I strongly suspect that the Profiler changed something in my system that causes the slow down. Maybe it's always profiling without storing the results or something like that. - mmmmmmmm
Maybe I've got a clue: Most of the time everything is slow is when DB access is used. I use a local instance of SQL server 2012. Most of my collegues use 2008 or 2014. A new collegue also installed 2012 and now has the same slow down... - mmmmmmmm
Okay...not the SQL server...but I figured out my problem: IntelliTrace was enabled by default. Disabling it made everything working much faster while debuggng. Maybe it is enabled for ASP.NET too? - mmmmmmmm
This too just started happening to me... but I just recently installed ReSharper. So, did this profiling tool adjust some setting causing the hanging time?? - DRapp

3 Answers

13
votes

I experienced this when I set a conditional breakpoint in code that was run frequently. Attempting to pause the debugger simply caused Visual Studio to... do nothing (other than grey out the pause menu option).

Visual Studio Remote Debugging Monitor was taking up about 30% CPU on a quad core system.

Removing the conditional breakpoint resolved the issue.

1
votes

Are you debugging the same application on both machines? If not, one thing to check is how many exceptions are being thrown with the II7.5/Windows 7 app vs. the win8 IIS 8.5 application - the debugger does quite a bit of work for each exception so has a magnifying effect on the slow-down.

If that is the issue you can try turning off debugging->output windows->exception Messages which should help some. Of course if you've got an application that is throwing enough exceptions to cause that kind of slow down and you have the ability to re-work the code to reduce the number of exceptions thrown in non-exceptional circumstances, that would help as well.

Failing that, you might try turning off all the output settings and IntelliTrace as all of those things potentially affect performance and if that solves the problem you can turn them back on one by one to figure out where the culprit is - even if they are identical applications enough changes under the hood between version that the events the debugger has to handle may be substantially different.

HTH

1
votes

This solution (credits to David W Gray) deserves separate answer.

Try disabling IntelliTrace (Debug => IntelliTrace => Open IntelliTrace Settings...)