KindDragon / CPPDebuggerVisualizers

C++ Debugger Visualizers
Boost Software License 1.0
173 stars 46 forks source link

boost::uuid natvis not working in vs2019 #33

Open justkarli opened 3 years ago

justkarli commented 3 years ago

Hi, the vs extension isn't working anymore in vs2019 when trying to resolve a boost::uuid. When comparing the extension directory I've recognized that the library referenced in the boost.natvis "CPPDebuggerVisualizersNatvisAddIn.dll" is missing when using the default installation over the Visual Studio Marketplace.

When enabling the verbose natvis logs I received the following message.

...\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\16.0_CA7B3D13\EXTENSIONS\CSSKHXNB.3TY\Visualizers\boost.natvis(390,2): Error: Legacy addin '...\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\16.0_CA7B3D13\EXTENSIONS\CSSKHXNB.3TY\Visualizers\CPPDebuggerVisualizersNatvisAddIn.dll' for type 'boost::uuids::uuid' cannot be used when out-of-process symbol loading is enabled. See https://aka.ms/VSCppEE-ExternalSymbolsCompat for more information.

At first, I've tried to get to the library by checking out and compile your source code. But the error message still occured. The solution for me was to finally read the detail information provided by vs at Visual C/C++ Custom Visualizer Compatibility.

It tells you as a user to disable "Load debug symbols in external process (native only)" and also steps to fix the change, which occured due to their externalization of the memory handling for components / plugins, as an extension owner.

Cheers, karli

KindDragon commented 3 years ago

Hi, Yes, I know. I should rewrite it using different technology, but I don't have time for it in the near future.

tim-weis commented 7 months ago

Here's a rough version that'll delegate to the intrinsic GUID visualizer:

<Type Name="boost::uuids::uuid">
    <DisplayString>{*(GUID*)&amp;data}</DisplayString>
</Type>

Alternatively, the following will work in Visual Studio as well (but may fail in WinDbg Preview):

<Type Name="boost::uuids::uuid">
    <DisplayString>{*(GUID*)this}</DisplayString>
</Type>