Unable to debug VSIX project
I ran into something simular in Visual Studio 2017. The options described by @Rubans don't seem to be necessary (anymore?).
In your current build configuration (Most likely Debug
), you need to make sure, that Deploy VSIX content to experimental instance for debugging
is checked in the Vsix property page:
OK I managed to get it working. In order to do so, I had to unload the vsix project and edit the file as an XML document.
Either remove the following lines from the project file:
<IncludeAssemblyInVSIXContainer>
false
</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>
false
</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>
false
</IncludeDebugSymbolsInLocalVSIXDeployment>
<CopyBuildOutputToOutputDirectory>
false
</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>
false
</CopyOutputSymbolsToOutputDirectory>
or set them to true:
<IncludeAssemblyInVSIXContainer>
true
</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>
true
</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>
true
</IncludeDebugSymbolsInLocalVSIXDeployment>
<CopyBuildOutputToOutputDirectory>
true
</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>
true
</CopyOutputSymbolsToOutputDirectory>
or add them under the ... node if they don't exist.
Once I removed these lines and rebuilt the solution, the dll and pdb were copied now as expected to the bin\debug folder as well as to the "AppData\Local\Microsoft\VisualStudio\10.0Exp\Extensions\" folder.
Been there.. in VS-2019 I'm developing a VSIX Async which worked fine, however at a certain point, Visual Studio Experimental Version stopped loading my VSIX in debug mode.
I am not sure of the root cause, but it coincided with opening a second VSIX project template in the same solution of Visual Studio. Don't know if that has anything to do with the issue, but on the first run, I found both VSIX-es loaded into the Experimental version session. At that point, I closed and reset the Experimental Version. On the next runs, no VSIX seemed to be loaded into the Experimental Version, when debugging.. very frustrating !
The solution I found, fiddling around
- close any instances of Visual Studio
- reset the Visual Studio Experimental Version using the commandline tool in Start menu.
- Open VS, load your VSIX solution
- clean your VSIX solution
- switch to Release mode (yes, do it..)
- Rebuild Solution then run
- on the Just my Code warning popup, choose Continue Debugging
- The Experimental Version will now start with your VSIX ! it is loaded !
- Release mode is not handy when debugging. Close the Exp version You will be back in your VSIX solution
- Switch back to Debug mode
- run again
For me, above sequence lets the problem disappear. VSIX is loaded as it should.