I've been working on a display debugger for Visual Studio 2017, and everything builds fine, but it doesn't show up in the list of display debuggers for the type. I've tried debugging in a temp instance of VS and installing the VSIX manually. I've checked a few projects I've found online, and everything seems identical. What could cause this? My fear is it's a change with 2017 that isn't documented (the VS SDK Github project doesn't have display debugger samples, and the VS templates don't reference it either).
My project is a class library, .NET 4.6.1, Any CPU, Debug or Release
The simplest example still doesn't work, but here it is:
[assembly: DebuggerVisualizer(typeof(Test.TestVisualizer), typeof(VisualizerObjectSource),
Target = typeof(System.String), Description = "Test Viz")]
namespace Test
{
public class TestVisualizer : DialogDebuggerVisualizer
{
override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
var str = objectProvider.GetObject()?.ToString();
MessageBox.Show($"Value: {str}", "Visualizer");
}
}
}
UPDATE: I modified the project file to just save the output files in addition to the VSIX. It turns out, the VSIX didn't actually contain the DLL. When I copied the DLL files to the Documents/Visual Studio 2017/Visualizers folder it works. I guess I just need to figure out VSIX packaging!
Apparently the extension itself is fine. The issue is with VSIX packaging or activation of the actual visualizer. I'll create a new question for that.
[EDIT] It turns out that VSIX package installing cannot be used for managed debugger visualizers. No errors, but it simply will not work. The only way to install a managed debugger visualizer is to copy the files to your Visualizers folder (reference in original question). You can do this manually or with an MSI. This needs to be documented!