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. Qt Creator debugger is slow
QtWS25 Last Chance

Qt Creator debugger is slow

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
14 Posts 7 Posters 3.9k 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.
  • cristian-adamC Offline
    cristian-adamC Offline
    cristian-adam
    wrote on last edited by
    #4

    Another alternative would be to use LLVM's lldb.exe with Visual C++'s PDB format.

    At QTCREATORBUG-28749: Use lldb.exe from LLVM package with Visual C++ compiler I've got a Hello World working, but only barely:

    alt text

    A 1 Reply Last reply
    2
    • D Offline
      D Offline
      DavidSchulz
      wrote on last edited by
      #5

      Hi,

      thanks for the very detailed investigation.

      This sounds like the python dumpers are trying to lookup a type that does not exist in the requested module (second parameter of cdbext.lookupType)...

      But, also quickly checked whether I can reproduce the issue here. Neither breaking in a function with that type nor pasting a lookup command of that type resulted in the time you have reported here.
      The command I used to check this was:

      !qtcreatorcdbext.script print(cdbext.lookupType('std::vector<unsigned __int64,std::allocator<unsigned __int64> >*',0).name())
      

      This can be pasted into the Command field of the Debugger Log which can be enabled under View -> Views 0> Debugger Log while in debug mode.

      Additionally looking up pointer types should always take a shortcut and should just return fake type without looking symbols up in the debugger.

      A common cause for slow debugging sessions is usually unused watchers since looking up those can take really long.

      If you could share a minimal project that can reproduce the issue for you I can have a detailed look here. Also the content of the right hand side of the Debugger log can be helpful to share.

      If you want to further investigate the issue on your side you would need to compile the cdbextension yourself (remember to link against a debug version of python) and set debugPyCdbextModule in <creatorsource>\src\libs\qtcreatorcdbext\pycdbextmodule.h to true (sorry, I have not implemented a buildsystem switch for this). And if that doesn't give you any usable information you might want to attach directly to the cdb and step through the individual functions.

      A 1 Reply Last reply
      0
      • A Offline
        A Offline
        Antonius
        wrote on last edited by
        #6

        As suggested by Cristian Adam, I just added a comment to https://bugreports.qt.io/browse/QTCREATORBUG-18287 My comment contains a minimal scenario which exhibits slowness (although not nearly as dramatic as in our real project).

        I did not have watchers during my experiment. Only one single breakpoint.

        1 Reply Last reply
        1
        • cristian-adamC cristian-adam

          Another alternative would be to use LLVM's lldb.exe with Visual C++'s PDB format.

          At QTCREATORBUG-28749: Use lldb.exe from LLVM package with Visual C++ compiler I've got a Hello World working, but only barely:

          alt text

          A Offline
          A Offline
          Antonius
          wrote on last edited by
          #7

          @cristian-adam Excerpt from https://bugreports.qt.io/browse/QTCREATORBUG-28749:

          • Unfortunately the pretty printes didn't work.
          • A Qt application is crashing the debugger with:...

          We are not too interested by such a setup.

          cristian-adamC 1 Reply Last reply
          0
          • cristian-adamC cristian-adam

            I think the main bugreport that tracks this is https://bugreports.qt.io/browse/QTCREATORBUG-18287

            Do you have a minimal project that reproduces the behavior? Feel free to upload it to the above bug report.

            Also do you have the Qt Debug Information Files installed?

            alt text

            A Offline
            A Offline
            Antonius
            wrote on last edited by
            #8

            @cristian-adam See my comment in https://bugreports.qt.io/browse/QTCREATORBUG-18287

            Yes, we did install "Qt Debug Information Files".

            1 Reply Last reply
            0
            • D DavidSchulz

              Hi,

              thanks for the very detailed investigation.

              This sounds like the python dumpers are trying to lookup a type that does not exist in the requested module (second parameter of cdbext.lookupType)...

              But, also quickly checked whether I can reproduce the issue here. Neither breaking in a function with that type nor pasting a lookup command of that type resulted in the time you have reported here.
              The command I used to check this was:

              !qtcreatorcdbext.script print(cdbext.lookupType('std::vector<unsigned __int64,std::allocator<unsigned __int64> >*',0).name())
              

              This can be pasted into the Command field of the Debugger Log which can be enabled under View -> Views 0> Debugger Log while in debug mode.

              Additionally looking up pointer types should always take a shortcut and should just return fake type without looking symbols up in the debugger.

              A common cause for slow debugging sessions is usually unused watchers since looking up those can take really long.

              If you could share a minimal project that can reproduce the issue for you I can have a detailed look here. Also the content of the right hand side of the Debugger log can be helpful to share.

              If you want to further investigate the issue on your side you would need to compile the cdbextension yourself (remember to link against a debug version of python) and set debugPyCdbextModule in <creatorsource>\src\libs\qtcreatorcdbext\pycdbextmodule.h to true (sorry, I have not implemented a buildsystem switch for this). And if that doesn't give you any usable information you might want to attach directly to the cdb and step through the individual functions.

              A Offline
              A Offline
              Antonius
              wrote on last edited by
              #9

              @DavidSchulz Did you notice my comment in https://bugreports.qt.io/browse/QTCREATORBUG-18287 ? Are you able to reproduce?

              1 Reply Last reply
              0
              • A Antonius

                @cristian-adam Excerpt from https://bugreports.qt.io/browse/QTCREATORBUG-28749:

                • Unfortunately the pretty printes didn't work.
                • A Qt application is crashing the debugger with:...

                We are not too interested by such a setup.

                cristian-adamC Offline
                cristian-adamC Offline
                cristian-adam
                wrote on last edited by
                #10

                @Antonius said in Qt Creator debugger is slow:

                @cristian-adam Excerpt from https://bugreports.qt.io/browse/QTCREATORBUG-28749:

                • Unfortunately the pretty printes didn't work.

                I've got the pretty printers to work with C++ standard types 🎉

                alt text

                • A Qt application is crashing the debugger with:...

                This one is still a problem.

                The good thing about lldb is that it's open source and we could fix issues. With cdb ... it's a bit more complicated.

                A 1 Reply Last reply
                1
                • cristian-adamC cristian-adam

                  @Antonius said in Qt Creator debugger is slow:

                  @cristian-adam Excerpt from https://bugreports.qt.io/browse/QTCREATORBUG-28749:

                  • Unfortunately the pretty printes didn't work.

                  I've got the pretty printers to work with C++ standard types 🎉

                  alt text

                  • A Qt application is crashing the debugger with:...

                  This one is still a problem.

                  The good thing about lldb is that it's open source and we could fix issues. With cdb ... it's a bit more complicated.

                  A Offline
                  A Offline
                  Antonius
                  wrote on last edited by
                  #11

                  @cristian-adam Good that progress is being made with lldb.

                  Five days ago, I asked @DavidSchulz whether he is able to reproduce my slight delays with the minimal project he had asked for, and which I posted on https://bugreports.qt.io/browse/QTCREATORBUG-18287 I got no answer so far. Are you able to reproduce those delays?

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    MiC78
                    wrote on last edited by
                    #12

                    Hi everyone,

                    I had this issue also (qt debugger really slow) and I realized that it was spending to much time setting the breakpoints. Therefore, while debugging, I was paying attention to the tab where the breakpoints arelisted and I realize that there were 7 or 8 breakpoints from a test project I used to work with (not any more, and nothing to do with the project I was currently working with). Do not ask me why they were there.

                    After deleteing all the breakpoints and just set the correct ones for my current project, the debugger was as fast as before.

                    I hope it helps at least someone.

                    G S 2 Replies Last reply
                    5
                    • M MiC78

                      Hi everyone,

                      I had this issue also (qt debugger really slow) and I realized that it was spending to much time setting the breakpoints. Therefore, while debugging, I was paying attention to the tab where the breakpoints arelisted and I realize that there were 7 or 8 breakpoints from a test project I used to work with (not any more, and nothing to do with the project I was currently working with). Do not ask me why they were there.

                      After deleteing all the breakpoints and just set the correct ones for my current project, the debugger was as fast as before.

                      I hope it helps at least someone.

                      G Offline
                      G Offline
                      GGYYHH
                      wrote on last edited by
                      #13

                      @MiC78 your way is useflu

                      1 Reply Last reply
                      0
                      • M MiC78

                        Hi everyone,

                        I had this issue also (qt debugger really slow) and I realized that it was spending to much time setting the breakpoints. Therefore, while debugging, I was paying attention to the tab where the breakpoints arelisted and I realize that there were 7 or 8 breakpoints from a test project I used to work with (not any more, and nothing to do with the project I was currently working with). Do not ask me why they were there.

                        After deleteing all the breakpoints and just set the correct ones for my current project, the debugger was as fast as before.

                        I hope it helps at least someone.

                        S Offline
                        S Offline
                        SimonSchroeder
                        wrote on last edited by
                        #14

                        @MiC78 said in Qt Creator debugger is slow:

                        Do not ask me why they were there.

                        If you just open up projects in QtCreator they are opened inside the default session. Sessions in Qt Creator never forget anything. In order to not carry over any breakpoints (or bookmarks) from other projects, create a new session for each project (and then later open the sessions and not the projects).

                        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