Search code examples
visual-studiovsix

How can I debug a VS Extension while still having another extension installed?


Everything I can find about debugging a VSIX talks says to use /rootsuffix Exp which uses the experimental zone where no extensions are installed. The issue I have is that my extension relies on the functionality of another extension if it's installed (specifically Visual Assist).

How can I debug my extension while also having another extension installed and active?


Solution

  • I was able to figure this out. It's only an issue on certain extensions, but the way to solve it is to manually copy the hashed folder from the main profile to the Exp profile.

    Go to this directory and there should be two very similarly named directories, one with "Exp" at the end. It will follow the format of VS Version number an underscore and a hash. %LocalAppData%\Microsoft\VisualStudio

    Open the non-Exp directory , open the Extensions directory , and then figure out which of the hashed directory contains the extension you need. Copy that to the Extensions directory of the Exp directory.

    Next, launch your VSIX to open the Exp mode. Open the Manage Extensions window. You should see your extension in the list of installed extensions but it will be marked as disabled. Enable it, close the instance of Visual Studio, and relaunch it. The extension should now be enabled.