Can I customize autoexp.dat to enable visualization of a QT QDomNode in Visual Studio 2010 Debugger
We are doing QT development in Visual Studio 2010. I would like to be able to see the contents of A QDomNode variable in the Visual Studio Debugger.
It is possible to customize the display of variables in the Visual Studio Debugger by customizing the autoexp.dat file. The QT 开发者_JAVA技巧Add in for Visual Studio adds many customizations to autoexp.dat that enable you to see relevant information for QT classes, and there are a number of discussions on customizing the autoexep.dat that include a customization for QDomNode that appear to originate from this Daniel Albuschat blog entry QT Debugging with Visual Studio 2005. However, QDomNode is still not visible to me even with the described modifcations to autoexp.dat.
I notice that QDomNode uses a member variable QDomNodePrivate* impl as a PIMPL to hide its data members behind. This is similar to the "d" pointer commonly used in QT, notably in QString, which is able to see data correctly... Any pointers would be appreciated...
A simple preview would be:
QDomNode|*::QDomNode{
preview ($e.impl->name)
}
But this does not really work, because the debugger can see the structure of impl only when it is "inside" qdom.cpp wich contains the definition of QDomNodePrivate. You can test this by stepping inside some QDom method. One "hacky" solution would be to copy the class definition of QDomNodePrivate into some header file that you include in your program.
And don't forget: You have to be Administrator to successfully edit autoexp.dat!
精彩评论