I have a type defined as:
typedef unsigned short StringChecksum;
which I eventually intend to use a NatVis to display the corresponding value in a global string table we have loaded in memory.
So I've defined a new NatVis for testing(which is my first time):
<?xml version="1.0" encoding="utf-8" ?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="StringChecksum">
<DisplayString>StringChecksum {this}</DisplayString>
</Type>
</AutoVisualizer>
I've turned on NatVis debugging in the registry and I can see my .natvis file being loaded by the debugger and parsed successfully.
I also have Edit and Continue turned off.
However when I debug code and examine a StringChecksum, I don't see any difference, it shows the integer. I expected it to show something like "StringChecksum 3433".
Is it possible for NatVis to work with types defined from a plain typedef? All of the examples I've seen are using classes. And if so any idea what might be wrong?
And the answer is no. The debugger cannot tell the difference from the original type.
Interestingly, enums and even strongly typed enums do not currently work in VS2012 Update 2 either even though the debugger can in fact tell the difference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With