Sometimes Visual studio is trying to tell me that I shouldn’t do what I’m doing at that very moment. This morning I had one of those episodes when trying to add items to the toolbox. I right-clicked on the toolbox and choose Add items. Suddenly visual studio is gone and I’m wondering what the heck happened. I know my development environment isn’t all that because of the sometimes really strange hacks I’m building. However this environment is pretty clean (still).
As it turns out visual studio sometimes throws exceptions when trying to add items to the toolbox. This causes the application to exit without leaving any trace that something was dying.
After a quick google I found out that you can start devenv.exe with the /safemode switch. This will show you any exceptions that happen when adding items to a project or in my case adding items to the toolbox. All I had to do was start visual studio with the /safemode switch, after that I choose add items again in the toolbox and simply selected all the tabs. This gave me a few errors (missing stuff etc.) and after that the application ran just fine.
I recommend restarting without the switch after performing this trick, as the safemode switch disables all add-ins as well and makes the environment very slow.