[Qt-creator] How to debug Qt Libraries

Andre Poenitz andre.poenitz at mathematik.tu-chemnitz.de
Fri May 29 21:26:19 CEST 2009


On Fri, May 29, 2009 at 10:21:58PM +0400, Rudenko Eugene wrote:
> Hello All.  I'd like to debug QT libraries from Qt-Creator on Ubuntu
> 8.04 (TLS).  I installed QT-SDK (for qt-creator), Install qt-embedded
> 4.5.0 with such keys: -qws -debug ...(keyboard and  mouse from qws).
> and installed it.  In Qt Creator I compiled debugger helper and
> configured this qt in QT  preferences.
> 
> Then I tried to see what setFocus() function do on QWidget, and make
> breakpoint on this call from my source-code.
> 
> Run in debug mode, and press F11 and got in qwidget.h (which located
> in /usr/local/Trolltech/qt-embedded-4.5.0), in this line: slot
> QT_SLOT: inline setFocus() {setFocus(Qt::OtheFocusReason);}

This line is inlined in your code, so it does not mean much that it is
found.

> I push F11 (Step into) and after some time (over 1 second ), returned
> back to my source code.
> 
> In GDB window nothing changed, and in sources window of debug is the
> list of installed headers.

So it probably did not find the sources or the debug info I am not yet
quite sure what your setup looks like: Did you compile your Qt yourself?
Did 'make install' strip the libraries?

A usually working setup is to configure Qt with  -prefix=$PWD  without
installing it.

Andre'



More information about the Qt-creator-old mailing list