Speed Up Debugging in Visual Studio 2010

TL;DR: If your VS Solution uses a lot of non Microsoft assemblies, uncheck Microsoft Symbol Servers under Tools –> Options –> Symbols for a dramatic reduction in the amount of time it takes to launch the debugger.

Visual Studio 2010 is great.  I spend 8+ hours a day using it and the fact that I don’t hate every second of it is a testament to it’s quality.  However, I do find it terribly slow.  And by terribly, I mean especially when I hit CTRL+F5 and then wait for a couple of minutes for everything to load up and hit the first breakpoint.

A couple of minutes! You can’t be serious!  How do you get anything done?

Well, it’s hard. Especially when I’m in The Zone.  Nothing like waiting to see the results of my latest refactor only to have everything grind to a halt while VS cranks out a new build and then launches into the debugger.  Of course, while I’m waiting Twitter, G+, FB, email and my news reader are all screaming for some attention.

The thing is, it shouldn’t be slow.  My workstation has dual Intel Xeon E5620 CPUs running at 2.4 GHz with, 12 GB of RAM and a nearly empty 7200 RPM disk. Most of the time it looks exactly like this:

SNAGHTML16224d97

Here’s what I discovered today while using Fiddler2 to solve a different problem:

SNAGHTML1617f26d

What the hell is all that?  And why does it happen EVERY SINGLE TIME I launch the debugger?

Well, it turns out that some time ago I stumbled across this handy little screen:

SNAGHTML1618b3b8

And just happened to click the “Microsoft Symbol Servers” checkbox.

Boom!

It turns out that the Microsoft Symbol Servers don’t host the symbols to the assemblies I’ve written myself, or those of third party and open source libraries I might also be using.  For some reason Visual Studio doesn’t know that and tries to download the symbols EVERY SINGLE TIME I launch the debugger.

From that day on my builds were the same speed but launching the debugger went from a few seconds to a couple of minutes.  And my productivity dropped like a rock as each time I got tired of waiting and moved onto something else, then eventually realized that it was done and waiting for me only now I couldn’t remember where I had left off.

Today, after discovering this, I unchecked the Microsoft Symbol Servers checkbox and saw an immediate reduction in the amount of time required to launch the debugger.  Now, I didn’t get out the stopwatch and do any timings, but what I can tell you is that the difference was enough that I started a blog and wrote this post just to be able to share this tidbit with the world.  And immediately used up all the productivity I would have gained from the faster builds.

Oh, and don’t even think about adding additional symbol servers to the list! If you do, you can multiply the number of assemblies times the number of servers and that’s how many 404’s you’ll see EVERY SINGLE TIME.  Yeah.   I had three servers in there… Microsoft plus two others… D’oh!  I don’t even want to tell you how many months ago I put them in there.

Posted in Life as a Developer | Tagged | Leave a comment