Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator (9.0.1 Debian) debugging helpers don't work. What can be done?
Forum Updated to NodeBB v4.3 + New Features

QtCreator (9.0.1 Debian) debugging helpers don't work. What can be done?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
20 Posts 4 Posters 3.1k Views 1 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.
  • Axel SpoerlA Offline
    Axel SpoerlA Offline
    Axel Spoerl
    Moderators
    wrote on last edited by
    #4

    Yes it has: See here how to inspect them.

    Software Engineer
    The Qt Company, Oslo

    A 1 Reply Last reply
    0
    • Axel SpoerlA Axel Spoerl

      Yes it has: See here how to inspect them.

      A Offline
      A Offline
      A.Stahl
      wrote on last edited by
      #5

      @Axel-Spoerl

      Yeah, I saw this window. Nothing interesting regarding my problem there, alas.

      It looks like those helpers are some Python scripts. Is it so? Where are they stored? Can they have python-tier compatibility issues? What can I read about them?

      I love IDEs while they work as intended, but when something inevitably brokes -- that is hell :)

      1 Reply Last reply
      0
      • Axel SpoerlA Offline
        Axel SpoerlA Offline
        Axel Spoerl
        Moderators
        wrote on last edited by
        #6

        Sorry for that!
        Can you please check if the debugging helpers work for Qt and custom classes? Or is it only std::containers that fail?
        Can you drop a qDebug() and iterate through the vector<int> experiment just to make sure that the object isn’t dangling?

        Software Engineer
        The Qt Company, Oslo

        A 1 Reply Last reply
        0
        • Axel SpoerlA Axel Spoerl

          Sorry for that!
          Can you please check if the debugging helpers work for Qt and custom classes? Or is it only std::containers that fail?
          Can you drop a qDebug() and iterate through the vector<int> experiment just to make sure that the object isn’t dangling?

          A Offline
          A Offline
          A.Stahl
          wrote on last edited by
          #7

          @Axel-Spoerl

          I don't use Qt and not sure if I could trivially add something Qt-related to a project.

          Custom classes? Well, simple things like

          struct Test
          {
          int a;
          int b;
          };

          looks fine, but does it need helpers?

          1 Reply Last reply
          0
          • Axel SpoerlA Offline
            Axel SpoerlA Offline
            Axel Spoerl
            Moderators
            wrote on last edited by
            #8

            On my PC (openSuSE Tumbleweed bleeding edge, Qt Creator 9.0.1), a std::vector<int> is correctly displayed in the debugger.

            The typical reasons for broken helpers are

            • dangling pointers / uninitialized memory
            • ptrace blocked (obviously not the case on your system)
            • debugging source not matching binaries
            • incompatible gdb and g++ versions (never had that myself)
            • object optimized out (no more usage before going out of scope)

            Things you can try to narrow it down:

            • use gdb pretty printer instead
            • iterate over std::vector<int> experimentand dump contents with qDebug() or just with cout if it's not a Qt project.

            Software Engineer
            The Qt Company, Oslo

            A 1 Reply Last reply
            0
            • Axel SpoerlA Axel Spoerl

              On my PC (openSuSE Tumbleweed bleeding edge, Qt Creator 9.0.1), a std::vector<int> is correctly displayed in the debugger.

              The typical reasons for broken helpers are

              • dangling pointers / uninitialized memory
              • ptrace blocked (obviously not the case on your system)
              • debugging source not matching binaries
              • incompatible gdb and g++ versions (never had that myself)
              • object optimized out (no more usage before going out of scope)

              Things you can try to narrow it down:

              • use gdb pretty printer instead
              • iterate over std::vector<int> experimentand dump contents with qDebug() or just with cout if it's not a Qt project.
              A Offline
              A Offline
              A.Stahl
              wrote on last edited by
              #9

              @Axel-Spoerl

              iterate over std::vector<int> experimentand dump contents with qDebug() or just with cout

              Not sure what you mean. Yes, I can iterate over the container and cout its content as I like; but I really would like more comfortable debugging than printf-tier.

              use gdb pretty printer instead

              I don't even remember when the last time I used gdb as it is. And a nice gdb interface is like 80% of my reason to use IDE :)

              1 Reply Last reply
              0
              • Axel SpoerlA Offline
                Axel SpoerlA Offline
                Axel Spoerl
                Moderators
                wrote on last edited by
                #10

                This advice is meant to figure out why it's failing for you. That's why I wrote

                Things you can try to narrow it down:

                If iterating and/or gdb pretty printer have a meaningful output, there's a bug in Qt Creator.
                If these options also fail, we have to find the issue on your system.

                Software Engineer
                The Qt Company, Oslo

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  A.Stahl
                  wrote on last edited by
                  #11

                  @Axel-Spoerl

                  If iterating and/or gdb pretty printer have a meaningful output

                  Iterating-"couting" works as it should.

                  1 Reply Last reply
                  0
                  • Axel SpoerlA Offline
                    Axel SpoerlA Offline
                    Axel Spoerl
                    Moderators
                    wrote on last edited by
                    #12

                    c75b5de2-d8b5-4d0c-9615-e5d0c15e2990-image.png

                    This is a std::vector<int>displayed with the debug helpers of Qt Creator 9.0.1.
                    That said, the issue at hand is a local one I am afraid, having nothing to do with Qt.

                    Software Engineer
                    The Qt Company, Oslo

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      A.Stahl
                      wrote on last edited by
                      #13

                      Yes, the problem isn't in the Qt, but in the QtCreator.

                      gdb works fine and gives rather readable results like

                      (gdb) p res
                      $1 = std::vector of length 6, capacity 8 = {std::vector of length 1, capacity 1 = {1}, std::vector of length 2, capacity 2 = {1, 1}, std::vector of length 3, capacity 3 = {
                          1, 2, 1}, std::vector of length 4, capacity 4 = {1, 3, 3, 1}, std::vector of length 5, capacity 5 = {1, 4, 6, 4, 1}, std::vector of length 6, capacity 6 = {1, 5, 10, 
                          10, 5, 1}}
                      

                      I need some help in understanding how does QtCreator process this data. What are those "debugging helpers". Where are they? What can be wrong with them? And whose responsibility they are.

                      A 1 Reply Last reply
                      0
                      • A A.Stahl

                        Yes, the problem isn't in the Qt, but in the QtCreator.

                        gdb works fine and gives rather readable results like

                        (gdb) p res
                        $1 = std::vector of length 6, capacity 8 = {std::vector of length 1, capacity 1 = {1}, std::vector of length 2, capacity 2 = {1, 1}, std::vector of length 3, capacity 3 = {
                            1, 2, 1}, std::vector of length 4, capacity 4 = {1, 3, 3, 1}, std::vector of length 5, capacity 5 = {1, 4, 6, 4, 1}, std::vector of length 6, capacity 6 = {1, 5, 10, 
                            10, 5, 1}}
                        

                        I need some help in understanding how does QtCreator process this data. What are those "debugging helpers". Where are they? What can be wrong with them? And whose responsibility they are.

                        A Offline
                        A Offline
                        A.Stahl
                        wrote on last edited by
                        #14

                        Ok, I have found those "helpers" at "/usr/share/qtcreator/debugger"

                        How can I be sure that they are working? Or even that QtCreator tries to use them?

                        1 Reply Last reply
                        0
                        • Axel SpoerlA Offline
                          Axel SpoerlA Offline
                          Axel Spoerl
                          Moderators
                          wrote on last edited by
                          #15

                          If Qt Creator is correctly installed, it finds and uses these helpers.
                          How do you build the debug executable? With or without Qt Creator?
                          Can you post the configure/qmake and compile output? Can you post a screenshot of the compile kit in Qt Creator?

                          Software Engineer
                          The Qt Company, Oslo

                          A 1 Reply Last reply
                          0
                          • Axel SpoerlA Axel Spoerl

                            If Qt Creator is correctly installed, it finds and uses these helpers.
                            How do you build the debug executable? With or without Qt Creator?
                            Can you post the configure/qmake and compile output? Can you post a screenshot of the compile kit in Qt Creator?

                            A Offline
                            A Offline
                            A.Stahl
                            wrote on last edited by
                            #16

                            @Axel-Spoerl

                            Yes, I created a tiny project just for dealing with this problem:

                            cmake_minimum_required(VERSION 3.5)
                            
                            project(experiment LANGUAGES CXX)
                            
                            set(CMAKE_CXX_STANDARD 17)
                            set(CMAKE_CXX_STANDARD_REQUIRED ON)
                            
                            add_executable(experiment main.cpp)
                            
                            08:11:40: Running steps for project experiment...
                            08:11:40: Starting: "/usr/bin/cmake" --build /home/astahl/work/experiment/build-experiment-Desktop-Debug --target all
                            [100%] Built target experiment
                            08:11:40: The process "/usr/bin/cmake" exited normally.
                            08:11:40: Elapsed time: 00:00.
                            

                            Kit config screenshot:

                            screenshot

                            A 1 Reply Last reply
                            0
                            • Axel SpoerlA Offline
                              Axel SpoerlA Offline
                              Axel Spoerl
                              Moderators
                              wrote on last edited by
                              #17

                              Well, all looks right.
                              So you should file a bug here, to have someone from the Qt Creator team take a look at it.

                              Software Engineer
                              The Qt Company, Oslo

                              1 Reply Last reply
                              0
                              • A A.Stahl

                                @Axel-Spoerl

                                Yes, I created a tiny project just for dealing with this problem:

                                cmake_minimum_required(VERSION 3.5)
                                
                                project(experiment LANGUAGES CXX)
                                
                                set(CMAKE_CXX_STANDARD 17)
                                set(CMAKE_CXX_STANDARD_REQUIRED ON)
                                
                                add_executable(experiment main.cpp)
                                
                                08:11:40: Running steps for project experiment...
                                08:11:40: Starting: "/usr/bin/cmake" --build /home/astahl/work/experiment/build-experiment-Desktop-Debug --target all
                                [100%] Built target experiment
                                08:11:40: The process "/usr/bin/cmake" exited normally.
                                08:11:40: Elapsed time: 00:00.
                                

                                Kit config screenshot:

                                screenshot

                                A Offline
                                A Offline
                                A.Stahl
                                wrote on last edited by
                                #18

                                @A-Stahl

                                Well, I was trying to find an alternative to the Creator and was installing/removing different other IDEs. After I failed, I returned to QtCreator to spend another day trying to fix the problem and found that everything was working as it should. No idea what was causing the problem, but now everything is ok.

                                Maybe some other IDE rewrote some faulty config of some inobvious utility?

                                No idea.

                                1 Reply Last reply
                                0
                                • A A.Stahl has marked this topic as solved on
                                • andrA Offline
                                  andrA Offline
                                  andr
                                  wrote on last edited by
                                  #19

                                  Good this is solved.

                                  A few remarks nevertheless:

                                  The debugger's log in Creator is in View->Views...->Debugger log.

                                  /proc/sys/kernel/yama/ptrace_scope is only relevant for attaching to running processes, it should not have played a role here.

                                  There's a Help->Contact entry saying

                                  Qt Creator developers can be reached at the Qt Creator mailing list:
                                  mailto:qt-creator@qt-project.org
                                  or the #qt-creator channel on Libera.Chat IRC:
                                  https://web.libera.chat/#qt-creator
                                  Our bug tracker is located at https://bugreports.qt.io.
                                  Please use https://pastebin.com for bigger chunks of tex

                                  1 Reply Last reply
                                  0
                                  • cristian-adamC Online
                                    cristian-adamC Online
                                    cristian-adam
                                    wrote on last edited by
                                    #20

                                    I just came here from a web search and the issue at hand here is described Qt Creator v9.0.2 Debug Helpers not Working on Ubuntu 23.04 and Debian Bookworm 12

                                    Namely Python3 syntax in Python2 source code used in the debugger helpers, which then fail silently.

                                    The issue has been tracked at https://bugreports.qt.io/browse/QTCREATORBUG-28505 and fixed in Qt Creator 10.

                                    1 Reply Last reply
                                    3

                                    • Login

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