If you ever need to debug a Visual Studio extension to diagnose problems or just test that it’s behaving how you expected, it’s quite easy to do by taking the following steps:
Firstly make sure your extension isn’t currently installed (if you’re working on a newer version or fixing bugs) – if so, uninstall it and restart VS before continuing.
Right-click on the project, choose Properties and switch to the Debug tab.
Click the radio button for “Start External Program” and point the file location at your Visual Studio executable. I’m using Visual Studio 2013 on a 64-bit machine and the devenv.exe is located here:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
Then add the following command line argument:
/rootsuffix Exp
This tells Visual Studio to start up using the experimental hive (it basically protects your normal Visual Studio settings from being amended while you’re running the debug instance).
Save the project file changes and now when you hit F5 it should start a new Visual Studio IDE with your Extension loaded.