[Qt-creator] Qt data types and debugging
Andre Poenitz
andre.poenitz at mathematik.tu-chemnitz.de
Fri Nov 7 19:33:59 CET 2008
On Fri, Nov 07, 2008 at 08:36:31AM -0900, Israel Brewster wrote:
> First off, I apologize if this has been asked before, but a quick
> perusal of the archives didn't turn up anything interesting.
It has not been asked before as far as I can tell.
> I recently downloaded and tried out the developer preview release of
> QtCreator, and in general it looked very promising. However, one of
> the features that was shown in the screen shots and videos (and which
> I was highly looking forward to) was the ability to view various Qt
> data types, such as QString, in the debugger. When I tried this in my
> application, however, the values did not show up. I could see the
> existence of the QString variable, of course, but the value column was
> blank, and I could not find a way to view the value.
There is some text under "Welcome -> Getting started -> Debugging
with Qt Creator"
> Looking in the QtCreator preferences window, I find a section for
> "Type Macros" under the debugger section, which points to a script
> file at /Applications/QtCreator.app/Contents/Resources/gdb/qt4macros
> that would appear (to my mind, at least) to deal with displaying
> QStrings in the debugger.
That's currently not used.
> The referenced script file, however, does
> not appear to exist. The closest I could find was /Applications/
> QtCreator.app/Contents/Resources/gdbmacros/gdbmacros.cpp, which is
> obviously a C++ source file, not a script file.
Right. That's compiled and linked together with your application
and provides the necessary infrastructure to display the Qt types.
This compilation and linking should happen automatically when
Build&Run -> Build Settings -> Link Debugging Helper is checked.
If checking that box does not help, you could also add that file
manually to the project yourself and used QT += network in the .pro
file. That has basically the same effect.
Andre'
More information about the Qt-creator-old
mailing list