Can I configure autoexp.dat to render QT QDomNode in Visual Studio 2010 Debugger

We are developing QT in Visual Studio 2010. I would like to see the contents of the Q Qomom variable in Visual Studio Debugger.

You can customize the display of variables in Visual Studio Debugger by customizing the autoexp.dat file. The QT Add in for Visual Studio adds a lot of customization to autoexp.dat that allows you to see relevant information for QT classes, and there is a series of discussion on customizing autoexep.dat that includes customization for QDomNode, which seems to come from This Daniel Albuschat blog introduces QT debugging with Visual Studio 2005 . However, QDomNode still does not appear to me even with the described modifcations for autoexp.dat.

I notice that QDomNode uses the member variable QDomNodePrivate * impl as PIMPL to hide its data. This is similar to the "d" pointer commonly used in QT, especially in QString, which is able to see the data correctly ... Any pointers will be appreciated ...

+1
source share
1 answer

Simple preview:

QDomNode|*::QDomNode{
    preview         ($e.impl->name)
}

But this does not work, because the debugger can see the impl structure only when it is "inside" qdom.cpp, which contains the definition of QDomNodePrivate. You can verify this by going inside some QDom method. One of the “hacker” solutions would be to copy the QDomNodePrivate class definition into some header file that you included in your program.

: , autoexp.dat!

+2

All Articles