@Tianyu Sun-MSFT , Hi! Sorry for a long reply.
After doing some experiments I've found out, that a custom implementation of IDumpExtension
can be exported via [Export]
attribute from any VSPackage and it will be actually picked up by Visual Studio.
However, this seems to work only if the directory Extensions\Microsoft\Debugger\Dumps
exists! If it doesn't, Visual Studio doesn't pick up my implementation of IDumpExtension
exported from my VSPackage (I tried latest Visual Studio 2017 and 2019). If I just create an empty directory, then it works perfectly.
I've looked at the implementation of DumpEngineProvider
(Microsoft.VisualStudio.Debugger.EditorSystem.DumpEngineProvider
from VsDebugPresentationPackage.dll
). I can see that method GetExtensionModules()
tries to enumerate the assemblies from Extensions\Microsoft\Debugger\ Dumps
and it just bails out if the directory doesn't exist. I think if would be better to ignore the directory if it doesn't exist and fallback to resolving IDumpExtension
without it.
Would it be possible to fix it in Visual Studio?