PDA

View Full Version : qt debug



tikismikis
13th March 2006, 02:32
Hi,

I'm trying debug my qt application but it doesn't work, or I think so. My qt version is 4.1 and it's compiled with the flag -debug-and-release.
I would like to see the debug information of qabstractsocket_debug that i can see in the source of qt, for example in $(QTDIR)/src/network/qabstractsocket.cpp. It's that possible??

I've a .pro file like this:

TEMPLATE = app
TARGET = cliente
DEPENDPATH += .
INCLUDEPATH += .
QT += network
CONFIG += console debug

# Input
HEADERS += cliente.h \
../p2pbackup/src/sslsocket.h \
../p2pbackup/src/messages.h \
../p2pbackup/src/preferences.h \
../p2pbackup/src/peerclient.h
SOURCES += cliente.cpp \
main.cpp \
../p2pbackup/src/sslsocket.cpp \
../p2pbackup/src/messages.cpp \
../p2pbackup/src/preferences.cpp \
../p2pbackup/src/peerclient.cpp

unix{
LIBS += -lssl -lcrypto
}

And in the last step my compiler output is:
g++ -Wl,-rpath,/usr/local/qt-4.1.1/lib -o cliente cliente.o main.o sslsocket.o messages.o preferences.o peerclient.o moc_cliente.o moc_sslsocket.o moc_peerclient.o -L/usr/local/qt-4.1.1//lib -lssl -lcrypto -lQtGui_debug -L/usr/local/src/qt/qt-x11-opensource-src-4.1.1/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtNetwork_debug -lQtCore_debug -lz -lm -ldl -lpthread

Anyone could help me??
Thanks

wysota
13th March 2006, 09:20
Are you getting other debug info on the console? Do qDebug() statements work? The project file and compiler input look fine, debug messages should work (provided that you start your app from the console).

tikismikis
13th March 2006, 10:18
Yes, qDebug() works fine and I run the application under console.

ChristianEhrlicher
13th March 2006, 10:55
This has nothing to do with qDebug nor Qt...
You have to uncomment '#define QABSTRACTSOCKET_DEBUG' in qabstractsocket.cpp and recompile Qt like in every other source where something is commented out by an ifdef.

tikismikis
13th March 2006, 11:59
Ohhh, you're right. Thank you Christian