qDebug() outputs only to QtCreator panel, but not to the cmd window



  • Throughtout the project there are a few qDebug() calls that dump tons of output to the Application Output panel. However when I run the same program on the Windows command window there is no output whatsoever. What am I doing wrong?



  • Hi, you're doing nothing wrong, no output in the CMD window is the expected behavior. Instead, you can download DebugView it can show the qDebug() calls.



  • You cannot be serious.



  • @hskoglund said:

    no output in the CMD window is the expected behavior

    It may be the expected default behaviour, but I'm pretty sure its changeable.

    If I remember correctly (don't have a Windows host handy), you need to add:

    CONFIG += console
    

    to your build (eg *.pro file) if you want such output in release builds.

    See, for example, this old thread: qDebug() under Windows.

    Cheers.



  • @Paul-Colby said:

    @hskoglund said:

    no output in the CMD window is the expected behavior

    It may be the expected default behaviour, but I'm pretty sure its changeable.

    If I remember correctly (don't have a Windows host handy), you need to add:

    CONFIG += console
    

    to your build (eg *.pro file) if you want such output in release builds.

    See, for example, this old thread: qDebug() under Windows.

    Cheers.

    Marvelous! You restored my faith in humanity!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.