Often when I need to debug something it's easier to print something using qDebug()
instead of debugging step-by-step using a debugger.
The problem is that from time to time the output of qDebug()
isn't displayed at all! The same with qWarning
and qCritical
. What's strange, it only occurs when running the project normally (Ctrl+R), while when debugging (F5) the output shows up.
The solution is simple:
add CONFIG += console
to your .pro file and rebuild the whole project.