Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. qDebug repeating output
QtWS25 Last Chance

qDebug repeating output

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
10 Posts 4 Posters 413 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Spacehopper
    wrote on last edited by Spacehopper
    #1

    Hi,
    I seem to have managed to do something strange to my Qt5 library on macOS Sequoia 15.4. I resurrected some old C++ code from several years ago and in the process seem to have made every call to qDebug repeat the output.

    For instance: qDebug("Grid solved.")
    results in this output:
    Grid solved.
    Grid solved.

    Is it possible to reinstall the relevant library?

    TIA.

    Chris

    SGaistS 1 Reply Last reply
    0
    • piervalliP Offline
      piervalliP Offline
      piervalli
      wrote on last edited by
      #2

      There more load instance.

      1 Reply Last reply
      0
      • S Spacehopper

        Hi,
        I seem to have managed to do something strange to my Qt5 library on macOS Sequoia 15.4. I resurrected some old C++ code from several years ago and in the process seem to have made every call to qDebug repeat the output.

        For instance: qDebug("Grid solved.")
        results in this output:
        Grid solved.
        Grid solved.

        Is it possible to reinstall the relevant library?

        TIA.

        Chris

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Spacehopper hi,

        Do you see that in Qt Creator ? On the command line ?
        Do you have a custom message handler ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        S 1 Reply Last reply
        0
        • SGaistS SGaist

          @Spacehopper hi,

          Do you see that in Qt Creator ? On the command line ?
          Do you have a custom message handler ?

          S Offline
          S Offline
          Spacehopper
          wrote on last edited by
          #4

          @SGaist

          Thanks for responding.

          I use Xcode as my IDE and I don't have a custom message handler. I don't have access to or use Qt Creator.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Spacehopper
            wrote on last edited by Spacehopper
            #5

            I run the code from Xcode using Product -> Run

            The output from qDebug appears in the console pane of Xcode

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Spacehopper
              wrote on last edited by
              #6

              This is code I started back in 2008 to solve Sudoku puzzles. It ran fine up until 2021 when I lost interest. However my wife has now become a Sudoku fanatic and asked me how to solve a slightly difficult puzzle. I resurrected the code to demonstrate using certain strategies and noticed that all qDebug output to the Xcode console pane was repeated. I put a breakpoint on a common code line using qDebug and when I single stepped through the code line it caused the output to be repeated so I assumed something odd had happened to the relevant library.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Spacehopper
                wrote on last edited by
                #7

                Ah! Interesting. If I run the app from a terminal the repeated output is absent. Any clue there?

                JonBJ 1 Reply Last reply
                0
                • S Spacehopper

                  Ah! Interesting. If I run the app from a terminal the repeated output is absent. Any clue there?

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #8

                  @Spacehopper
                  I do not know how it works under Mac/Xcode, but I would say: qDebug() output appears on "stdout"/"stderr" or similar. That is one output you see from a plain terminal. Whatever "IDE" Xcode is, it sounds like inside it it (Xcode) also echoes any such messages --- debug output or stderr or whatever --- to output, hence you see it twice? I do not know whether there is maybe an Xcode setting for that.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Spacehopper
                    wrote on last edited by
                    #9

                    OK, so thinking this through, it looks like the problem lies with some setting in Xcode. I apologise for posting to the wrong forum and thank you for your forbearance.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Spacehopper
                      wrote on last edited by
                      #10

                      @JonB

                      Xcode is the macOS IDE offering for development for ANY Apple OS. I have been using it, on and off, since 2006 without too much in the way of problems but Xcode has changed a lot since I last used it in 2021 hence my rustiness. :-)

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved