Tuesday 29 April 2014

Visualizing the contents of QExplicitlySharedDataPointer or QSharedDataPointer in Visual Studio 2012 for Qt5

The path "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\Debugger\Visualizers" contains qt5.natvis, which performs the role that autoexp.dat once did in previous versions of Visual Studio.

The following lines stomp on your QSharedData-derived classes and prevent showing their own data in the debugger:

    <Type Name="QSharedData">
        <Expand>
            <Item Name="[referenced]">ref._q_value</Item>
        </Expand>
    </Type>

So delete them and you'll be able to see what a QExplicitlySharedDataPointer<> actually points to!

No comments:

Post a Comment