Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-32665

terminal in QtCreator cannot output qDebug and std::cout content

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • Qt Creator 17.0.0-beta1
    • Qt Creator 15.0.1, Qt Creator 16.0.0
    • Terminal
    • None
    • win11 x64; MSVC 2022 or MinGW; Qt 6.8.2
    • Windows
    • 707f858eb (17.0)

    Description

      The code is as follows:

      #include <iostream>
      #include <QDebug>
      
      using namespace std;
      
      int main(int argc, char *argv[])
      {
          cout << "Hello World!" << endl;
          qDebug() << "xxxxx";
          return 0;
      } 

      Qt Creator 15.0.1:Screen Recording 2025-03-25 092600.mp4

      As you can see in the video attachment, it has been run three times in total: the first time it can output normally, but the second and third times it cannot. 

      During my testing process, sometimes I can receive the output of qDebug, and sometimes I can receive std::cout output, but most of the time both are not received.

      Qt Creator 16.0.0: Qt Creator 16.0.mp4

      On version 16.0.0, information can be displayed after several attempts, but it is not displayed correctly in many cases.

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-32665
        # Subject Branch Project Status CR V

        Activity

          People

            madwinter Marcus Tillmanns
            chinanewer Wang Chaoyang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes