Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Not seeing QDebug output from within a plugin.
Forum Updated to NodeBB v4.3 + New Features

Not seeing QDebug output from within a plugin.

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 824 Views 2 Watching
  • 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.
  • D Offline
    D Offline
    DalePennington
    wrote on last edited by
    #1

    I am developing a custom virtual keyboard plugin on RHEL 8 using QT5.12.5. It is mostly working, but a few parts are not.
    So I decided to add some qDebug outputs to see if I could determine where in the logic flow things stop working properly, just as I would do in a normal app.

    The problem is that I am not seeing the qDebug output messages I would expect to see. Just to check, I placed a qDebug message in the part of code that is working correctly (I can see it working), and did not get that output either.

    Just to be sure, I built the plugin in debug mode, and installed again. And still no qDebug output in the terminal window.

    Am I missing some special setting to make it visible ? Or is it going somewhere else I need to look at ?

    Thanks,
    Dale Pennington

    Pl45m4P 1 Reply Last reply
    0
    • D DalePennington

      I am developing a custom virtual keyboard plugin on RHEL 8 using QT5.12.5. It is mostly working, but a few parts are not.
      So I decided to add some qDebug outputs to see if I could determine where in the logic flow things stop working properly, just as I would do in a normal app.

      The problem is that I am not seeing the qDebug output messages I would expect to see. Just to check, I placed a qDebug message in the part of code that is working correctly (I can see it working), and did not get that output either.

      Just to be sure, I built the plugin in debug mode, and installed again. And still no qDebug output in the terminal window.

      Am I missing some special setting to make it visible ? Or is it going somewhere else I need to look at ?

      Thanks,
      Dale Pennington

      Pl45m4P Online
      Pl45m4P Online
      Pl45m4
      wrote on last edited by
      #2

      @DalePennington

      QDebug included properly? Correct syntax? (qDebug() << "msg" or qDebug("msg"))
      Are you using QtCreator? Did you check the QtCreator App Output area for any output?
      Do you re-direct messages somewhere else?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DalePennington
        wrote on last edited by
        #3

        QDebug is included, I am using in inserter mode (and have used it in normal apps before).

        I am running on RHEL 8 strait from the Terminal Window, so expected it in the terminal window, with no redirections involved. No QtCreator use involved.

        JonBJ 1 Reply Last reply
        0
        • D DalePennington

          QDebug is included, I am using in inserter mode (and have used it in normal apps before).

          I am running on RHEL 8 strait from the Terminal Window, so expected it in the terminal window, with no redirections involved. No QtCreator use involved.

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by
          #4

          @DalePennington
          I don't know anything about plugins. But all messages from qDebug() go via the application-global message handler. See https://doc.qt.io/qt-5/qtglobal.html#qInstallMessageHandler for how to install your own, and do something there (even just a debugger breakpoint) to see whether it is being hit but you don't know where your messages are going vs it is not being hit at all.

          1 Reply Last reply
          1
          • D Offline
            D Offline
            DalePennington
            wrote on last edited by
            #5

            Tried that as well, and still did not see and qDebug output.

            Ended up putting a qDebug() into my main app, in the main window constructor, and still got no qDebug output (build as either debug or release). This is in QT 5.12.5 on RHEL8.

            This is actually turning into a significant issue by itself, as we definitely need qDebug to work as it did in QT 4.

            Pl45m4P 1 Reply Last reply
            0
            • D DalePennington

              Tried that as well, and still did not see and qDebug output.

              Ended up putting a qDebug() into my main app, in the main window constructor, and still got no qDebug output (build as either debug or release). This is in QT 5.12.5 on RHEL8.

              This is actually turning into a significant issue by itself, as we definitely need qDebug to work as it did in QT 4.

              Pl45m4P Online
              Pl45m4P Online
              Pl45m4
              wrote on last edited by Pl45m4
              #6

              @DalePennington

              Have you seen this?
              https://bugzilla.redhat.com/show_bug.cgi?id=1227295

              It was about 5 year ago, but maybe you still have to enable qDebug first, somewhere somehow


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              1 Reply Last reply
              2
              • D Offline
                D Offline
                DalePennington
                wrote on last edited by
                #7

                Yep, that is the answer. If I set default.debug=true I get the qDebug (if I tried *.debug=true I got flooded with everything else).

                Now I can either fix it programmatically or add changing the rules to our configuration setup.

                Thanks,
                Dale

                1 Reply Last reply
                0
                • JonBJ Online
                  JonBJ Online
                  JonB
                  wrote on last edited by JonB
                  #8

                  @Pl45m4 , @DalePennington
                  I have always been Ubuntu (Qt with distro) and have never had a problem with qDebug() output, always there. I skimmed through the bug report. I'd be interested to understand: do you know why whatever the cause(s) was it affected RHL and not Debians, in layman's terms? If it was a global configuration file(?), why would that be any different across distros?

                  Pl45m4P 1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    DalePennington
                    wrote on last edited by
                    #9

                    I am assuming that RH made that modification to the file and made it part of the package they distribute. It is an official RPM. An easy way to check would be to see if there is an equivalent qtlogging.ini file on your system. If it is not there, or has different values, than it is something RH elected to add to their distribution.

                    I did verify the file comes from their Qt5 Qt Base Components package.

                    1 Reply Last reply
                    1
                    • JonBJ JonB

                      @Pl45m4 , @DalePennington
                      I have always been Ubuntu (Qt with distro) and have never had a problem with qDebug() output, always there. I skimmed through the bug report. I'd be interested to understand: do you know why whatever the cause(s) was it affected RHL and not Debians, in layman's terms? If it was a global configuration file(?), why would that be any different across distros?

                      Pl45m4P Online
                      Pl45m4P Online
                      Pl45m4
                      wrote on last edited by
                      #10

                      @JonB

                      I'm using Windows as well as Linux (mostly Ubuntu) and also never got any problem with qDebug.
                      Seems to be a Red Hat / Fedora thing.


                      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                      ~E. W. Dijkstra

                      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