4

I am using the natvis system to make debugging my custom types easier.

I have a simple array type that I wish to make expandable...

<Type Name="Array&lt;*&gt;">
    <DisplayString>used={m_used} ptr={m_ptr}</DisplayString>
    <Expand>
        <ArrayItems>
            <Size>m_used</Size>
            <ValuePointer>m_ptr</ValuePointer>
        </ArrayItems>    
    </Expand>
</Type>

I have enabled natvis parser debugging using the EnableNatvisDebugger=0x0000001 reg key

When I run the program and hover over my array in the debugger, I get the following output

.natvis(25,26): Successfully parsed expression 'm_used' in type context 'Array<int>'.
.natvis(25,32): Successfully parsed expression 'm_ptr' in type context 'Array<int>'.
.natvis(28,15): Successfully parsed expression 'm_used' in type context 'Array<int>'.
.natvis(29,23): Successfully parsed expression 'm_ptr' in type context 'Array<int>'.

Unfortunately the visualiser only seems to work when hovering over items and pinning them in the code window. It does not work in any of the watch windows. Also the child item expansion doesn't work at all either.

I am running the following version of VS2012

Microsoft Visual Studio Professional 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

I have disabled Edit and Continue, and switched off support for Managed C++ Compatability. I should probably mention that none of the visualisations for the STL work either.

I am a bit stumped.

Marco A.
  • 43,032
  • 26
  • 132
  • 246
Stimpleton
  • 41
  • 1

0 Answers0