[Interest] debugging: how to get meaningful QObject information in a command line session

René J.V. Bertin rjvbertin at gmail.com
Tue May 26 14:58:36 CEST 2015


On Tuesday May 26 2015 13:34:26 Andreas Pakulat wrote:
Hi Andreas,

>QObject. QString does not subclass QString and hence you cannot call those
>functions on a QString.

Ah, of course, and it doesn't subclass QObject either ;)

>For QString debugging there's QString::toUtf8().data() which will give you
>a temporary C string that can be printed.

That's already quite something; very often it helps a lot already to be able to query the contents of a QString object to have an idea what went wrong where.

>see them in the debugger with a simple 'p' or access their children. I'm
>not sure right now wether Qt ships such a file for gdb or wether QtCreator
>contains them, or maybe both.

I have looked some more, haven't found anything in the Ubuntu repository. I presume that the debugger plugin (or however it was called) that can be installed through Qt Creator's toolchain preferences is strictly for use with that IDE?

Cheers,
René



More information about the Interest mailing list