views:

922

answers:

2

I'm trying to debug in QtCreator on Linux and I get the message:

The debugged binary does not contain information needed for nice display of Qt data types.

You might want to try including the file

.../share/qtcreator/gdbmacros/gdbmacros.cpp

into your project directly.

Adding ~/qtcreator/gdbmacros/gdbmacros.cpp to my project file does not help.

Any ideas?

A: 

Please check that Build&Run -> Build Settings -> Link Debugging Helper is checked and that you have at least Qt 4.4.

Also, if you are using a release candidate previous to version 1.0 then you should update to the latest release version. The current version is 1.0 and is available here.

Arnold Spence
bmm
Then this makes the question still unanswered.
bmm
See my answer for a solution that works with the current version (1.2.1)
nimrodm
+1  A: 

From the "Tools" menu select "Options". In the tree widget (left pane) you will find an entry for QT4.

The right pane will indicate if QT has been detected (most likely yes, in your case) and whether debugging helper was found.

If debugging helper code was not found you will have an option to "generate debugging helper". Click that option and you are done.

When you finally get to debugging your code, select Debug/Views/Debugger. With the mouse in the debugger pane, right click and make sure "use debugging helper" is checked in the context menu.

This worked for me only in QT projects and only for specific classes. E.g., QString displays nicely but std::string does not (std::vector does work).

nimrodm
Thanks for the update
Arnold Spence