Debugging in Qt program in Qt Creator
-
Hi All,
I have recently started learning Qt and using Qt Creator IDE. I would like to know ways to debug a program [apart from putting commands for display through debug() .
Thanks in advance!
-
Hi All,
I have recently started learning Qt and using Qt Creator IDE. I would like to know ways to debug a program [apart from putting commands for display through debug() .
Thanks in advance!
Dont quite understand your question.
You debug by starting your debugger... set breakpoints, check function calls / stack trace or content of your pointers and variables...
Depends on what happens. If your program crashes or if it's not doing what you expect. -
I have added the following to my .pro file .
message ("removed all subdirs here Nov 17 no differnce ")
SUBDIRS += \ # ../../../../../BACKUP/CAT-28-3/PROJECTS/CAT_FT857_BLUETOOTH/CAT_FT857_BLUETOOTH_MAIN_PROJECT/TEST_MDI/TEST_MDI.promessage(:dupressdd complier warningsd \ # ../../EXAMPLES_COPY_5.x/Examples/Qt-6.2.0/bluetooth/btchat/btchat.pro \ # ../../Examples/Qt-5.15.2/bluetooth/btscanner/btscanner.pro message("supress all warnings ") QMAKE_CXXFLAGS += -w #QMAKE_CXXFLAGS_WARN_OFF message ("verbose output compiler ") QMAKE_LFLAGS += -v message ("verbose output linker ") QMAKE_CXXFLAGS += -Wl, --verbose message (" disable qDebug messages") #//CONFIG += console #DEFINES += QT_NO_DEBUG_OUTPUT
It is somewhat redundant or stupid , take your pick.
I use heavily#ifdef BYPASS
useless old code but sometime prevents making same mistake
#endifthen old stand by
#define DEBUG#ifdef DEBUG
trace / debug notes
....
#endifBest debug tool
for(;;)
comment your codePS
Anybody care to add how to "remove all break points", senior moment.PPS
I cannot be held responsible for the messed-up text...