views:

643

answers:

3

I just started using Qt and I wanted to debug my Qt application. Can I use the standard GDB debugger with Qt executables?

A: 

Yes, you can. First Google hit is this KDEbase tutorial.

Dirk Eddelbuettel
+7  A: 

Yes you can. You might also want to use the gdb integration in Qt Creator, which does a much better job of inspecting data at run time than gdb alone.

Magnus Hoff
You will want to use the gdb macros, but you don't need to use qt creator for that! Without them, interrogating Qt data types is a real pain.
Thomi
+2  A: 

There is no reason why you might not do so.

As Qt executables are just normal executables compiled by GCC you could debug them as all others.

The fact that the Qt build process auto-generates intermediate C++ files does not prevent this because those intermediate C++ files are just compiled normally together with your own files into the executable.

rstevens