Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QtCreator: qDebug Messages Not Shown

I am currently using QT Creator 3.2.1 with Qt 5.3.2 (as required by my current project) on Windows 7 (64 bits, Ultimate). I am currently working on a GUI project

I am unable to see any qDebug messages in the Application Output window despite already done the following:

  1. Having the appropriate QDebug code
  2. Building the project in Debug mode
  3. Using "CONFIG += openssl-linked" "CONFIG += console" as additional arguments for building the project
  4. Not defining QT_NO_DEBUG_OUTPUT at all
  5. Confirming that I have a debugger (GDB from MinGW 4.8.2 32 bit installed during installing QtCreator)

May I know what else should I try? Thanks!

like image 799
darkarn Avatar asked Oct 20 '25 12:10

darkarn


1 Answers

This did it for me on Arch Linux

Qt creator > Tools > Options > Kits, select your kit, find Environment, click change and add:

   QT_ASSUME_STDERR_HAS_CONSOLE=1

Now the Message can be printed in the Application Output with something like that:

   qDebug() << "User clicked on the button!";

Screenshot on how to enable qDebug message

And than you should see something in the program like so:

qDebug output screenshot

like image 163
Ingo Mi Avatar answered Oct 22 '25 04:10

Ingo Mi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!