Had a weird issue today where visual studio would blow up when I finished debugging a unit test. Turns out, the bug wasn’t anything to do with debugging or unit testing etc, but a bug in visual studio 2008 that may manifest if you changed your panel layouts. Each time I debugged the test, I was moving the immediate window from it’s default position to be docked with the other debug windows at the bottom of the screen and it was this that was causing the crash. There’s a hotfix available from the Microsoft bods: