Important: Please read the Qt Code of Conduct -

Immediate window in QT Creator?

  • I have been working with Visual Studio and find the immediate window there very usefull for debugging, Does QT Creator have something like that? Currently on QT Creator 4.11.0.

  • Lifetime Qt Champion

    Hi @Gertio ,

    What is the "immediate window"?


  • To tell shortly: While debugging and stopping on a breakpoint, you can insert C++ commands directly in there and return is printed. Something like python, where you start command line and type in "1+1" and it prints "2", you can use the variables there available at that brak point and also call functions, which were compiled. If you want to know more just google for visual studio immediate window.

    It is usefull if you want to e.g. fix a bug but dont know if something you have in mind will work, so you just use break point and then use that window and see if it returns the desired result. That way you dont have to restart the debugging for the possible ways to fix a bug (if there could be more than one way and you search for the most suitable one)

  • Hi @Gertio
    Ofcourse we have debugging mode in Qt Creator ,
    select a break point line on the program editor by clicking on the line number, red mark symbol will come after that you can see bottom left corner a Start debugging option upon click debugging will start , step by step iteration from the point of Break Point marked, another window open and show the compilation output and program flow .
    Here is the one example showing the debugging mode.

  • Hi @Kiranachari-Shilpi ,
    Thank you for reply, but my question was not "Does QT Creator have debug mode?", it was "Does QT Creator have Immediate window?"

  • Lifetime Qt Champion

    Hi @Gertio,

    for QML there is indeed the Debugger Console, as @Kiranachari-Shilpi's link shows.

    For C++, you can at least evaluate expressions.

    Some more functions might be available with direct debugger commands in the Windows > Views > Debugger Log. In principle you should be able to call functions from there, but I've never tried that.

    To sum up, some of the functionality is there, but not as nicely prepared as in VS. But it comes for free...


    Edit: You may also comment and vote on QTCREATORBUG-19870 to improve the Debugger Console for C++.

Log in to reply