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. Debugging stl objects with QtCreator 4.4.1
QtWS25 Last Chance

Debugging stl objects with QtCreator 4.4.1

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qtcreator 4.4.1debugging
9 Posts 3 Posters 3.5k 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.
  • N Offline
    N Offline
    nyakacs
    wrote on last edited by
    #1

    Hi,

    I am trying to debug an old code using std objects. It is on MinGW32 on windows. For a while debugging std objects seems to be a problem in Creator as they are marked not accessible. Please see screen shot of example.

    Creator used to be the best tool but debugging with minGW was always iffy. However in the latter releases, since about 3.2, it got rather difficult.
    I tried various Qt versions and the associated minGW compilers up until Qt 5.9.2.

    Am I missing a trick somewhere? is there a solution of getting std object working again?

    0_1508766005910_f7377e52-da87-4d9d-a9e9-b932b8d194a4-image.png

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nyakacs
      wrote on last edited by
      #2

      It seems, that if I open Debugger log, right click and select reload debugger helpers, than it works as expected. However I need to do it every time the debugging is started. I guess the question is whether it is possible to automatically load debugger helpers when the debug session starts?

      K 1 Reply Last reply
      0
      • N nyakacs

        It seems, that if I open Debugger log, right click and select reload debugger helpers, than it works as expected. However I need to do it every time the debugging is started. I guess the question is whether it is possible to automatically load debugger helpers when the debug session starts?

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        @nyakacs

        Did you check under "Tools"->"Options"->"Debugger"->"Locals&Expressions" that the "Use Debugging Helper" are checked?

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • N Offline
          N Offline
          nyakacs
          wrote on last edited by
          #4

          Yes, it is checked. Also the right clicking on the Locals & Expression pane shows a tick mark in front of "Use Debug Helpers" . It does not make a difference.

          K 1 Reply Last reply
          0
          • N nyakacs

            Yes, it is checked. Also the right clicking on the Locals & Expression pane shows a tick mark in front of "Use Debug Helpers" . It does not make a difference.

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @nyakacs

            I do not see those problems on windows 10 with latest Qt creator 4.4.1, but I am debugging Qt 5.4.2.

            Did you install MinGW separately?

            My installation is standard with online installer. No self-compiled stuff. Also MinGW is installed through online installer.

            IIRC I had such issues way back with a self-installed MinGW version for 64 bit. I had to install a different version of GDB. However, the pattern does not match in my opinion, because you can activate through reload.

            When you have to reload after restart of your PC and/restart of Qt creator, it might worth to check on JIRA and eventually file a bug report.

            If you have MinGW installed separately, I recommend to check with a version installed through online installer.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • N Offline
              N Offline
              nyakacs
              wrote on last edited by
              #6

              It is win10 with the Qt creator 4.4.1. There is no self installed part.It was installed with the on-line installer together with MinGW. I have however and older installation of Qt5.3.1 in a different folder. That was installed also with the installer and no changes were made to it. I keep it as a reference. I found that anything newer than that has some rough edges.

              To check that the problem was not Qt version or compiler dependent, I made the sample project and compiled with various versions all from the on-line installer. I tried the latest 4.9.2 as well. It is all the same.

              However, I have not made a fresh install for some time. I always update creator and other components with the online updater.

              I found a new problem related to the debugger. It seems that the "Re-run this run configuration" button does something interesting. It restarts the debugger, as it should, but than after some time, it just stops with the debugging has finished message. Using the main Debug button however works every time. I wander if these are related issues.

              K 1 Reply Last reply
              0
              • N nyakacs

                It is win10 with the Qt creator 4.4.1. There is no self installed part.It was installed with the on-line installer together with MinGW. I have however and older installation of Qt5.3.1 in a different folder. That was installed also with the installer and no changes were made to it. I keep it as a reference. I found that anything newer than that has some rough edges.

                To check that the problem was not Qt version or compiler dependent, I made the sample project and compiled with various versions all from the on-line installer. I tried the latest 4.9.2 as well. It is all the same.

                However, I have not made a fresh install for some time. I always update creator and other components with the online updater.

                I found a new problem related to the debugger. It seems that the "Re-run this run configuration" button does something interesting. It restarts the debugger, as it should, but than after some time, it just stops with the debugging has finished message. Using the main Debug button however works every time. I wander if these are related issues.

                K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                @nyakacs

                My fresh installation of Qt after change of PC is about 2 month ago with an update to recent Qt creator 4.4.1

                There are some files on AppData which might be corrrupted, but I do not know details. Therefore, I cannot give you advice.

                If you are doing a fresh installation after removing the Qt installation, ît might be a good idea to erase those folders on AppData/Local/QtConfig and AppData/remote/QtConfig. However, you are loosing all setups and it is IMHO worth to make backup copy upfront.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  Adam C
                  wrote on last edited by
                  #8

                  It might help to disable Options -> Debugger -> GDB -> Load .gdbinit file on startup and Load system GDB pretty printers.

                  I'm not on Windows, but it might be a similar issue..

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    nyakacs
                    wrote on last edited by
                    #9

                    Thanks for this Adam. It seems that disabling Load .gdbinit does the trick. Do you know why this is a problem?

                    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