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. How to run gdb commands from qtcreator debugger?

How to run gdb commands from qtcreator debugger?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
9 Posts 3 Posters 4.0k 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.
  • Tom assoT Offline
    Tom assoT Offline
    Tom asso
    wrote on last edited by
    #1

    I want to run gdb commands directly from qtcreator debugger. The qtcreator documentation (https://doc.qt.io/qtcreator/creator-debug-mode.html#directly-interacting-with-native-debuggers) says this:
    "In Qt Creator, you can use the left pane of the Debugger Log view for that purpose. When you press Ctrl+Enter, the contents of the line under the text cursor are sent directly to the native debugger. Alternatively, you can use the line edit at the bottom of the view."

    But when I look at the left pane of the "Debugger log view" I do not see a "line edit" at the bottom. I also don't understand what they mean by the "contents of the line under the text cursor". Please see attached image. Can anyone help?

    I am running QT Creator 4.8.1
    0_1557960789767_qtcreator.png

    aha_1980A 1 Reply Last reply
    0
    • Tom assoT Tom asso

      I want to run gdb commands directly from qtcreator debugger. The qtcreator documentation (https://doc.qt.io/qtcreator/creator-debug-mode.html#directly-interacting-with-native-debuggers) says this:
      "In Qt Creator, you can use the left pane of the Debugger Log view for that purpose. When you press Ctrl+Enter, the contents of the line under the text cursor are sent directly to the native debugger. Alternatively, you can use the line edit at the bottom of the view."

      But when I look at the left pane of the "Debugger log view" I do not see a "line edit" at the bottom. I also don't understand what they mean by the "contents of the line under the text cursor". Please see attached image. Can anyone help?

      I am running QT Creator 4.8.1
      0_1557960789767_qtcreator.png

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi @Tom-asso,

      You have to open the debugger log with Windows > Views > Debugger Log first.

      Regards

      Qt has to stay free or it will die.

      Tom assoT 1 Reply Last reply
      3
      • aha_1980A aha_1980

        hi @Tom-asso,

        You have to open the debugger log with Windows > Views > Debugger Log first.

        Regards

        Tom assoT Offline
        Tom assoT Offline
        Tom asso
        wrote on last edited by
        #3

        @aha_1980 - I do not see "Windows->Views" in qtcreator for linux, version 4.8.1

        Tom assoT 1 Reply Last reply
        0
        • Tom assoT Tom asso

          @aha_1980 - I do not see "Windows->Views" in qtcreator for linux, version 4.8.1

          Tom assoT Offline
          Tom assoT Offline
          Tom asso
          wrote on last edited by
          #4

          I do see Windows->Output Panes->Debugger Console (not called "Debugger Log" in this version - is it the same thing?) - that is already open, see the image attached to this post. But I do not see anywhere to enter a gdb command in either of those Debugger Console panes. The left pane (referred to in the user guide) just shows a list of break points, no text area to enter commands. Where can I find that command line input area?

          aha_1980A 1 Reply Last reply
          0
          • Tom assoT Tom asso

            I do see Windows->Output Panes->Debugger Console (not called "Debugger Log" in this version - is it the same thing?) - that is already open, see the image attached to this post. But I do not see anywhere to enter a gdb command in either of those Debugger Console panes. The left pane (referred to in the user guide) just shows a list of break points, no text area to enter commands. Where can I find that command line input area?

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Tom-asso

            Here:
            0_1558025838047_61f6c6ac-1d98-4239-bd51-8252381c8194-image.png

            If it's grayed out, then click the Debug mode on the left mode selector first.

            (I have 4.9, so the naming is slightly different, but it should be nearly the same if 4.8)

            Qt has to stay free or it will die.

            Tom assoT 1 Reply Last reply
            1
            • aha_1980A aha_1980

              @Tom-asso

              Here:
              0_1558025838047_61f6c6ac-1d98-4239-bd51-8252381c8194-image.png

              If it's grayed out, then click the Debug mode on the left mode selector first.

              (I have 4.9, so the naming is slightly different, but it should be nearly the same if 4.8)

              Tom assoT Offline
              Tom assoT Offline
              Tom asso
              wrote on last edited by
              #6

              @aha_1980 - my version 4.8.1 only has "Views->Debugger Log", but I don't see the gdb command input anywhere in the displayed Debugger Log panes - do you see gdb command input in version 4.9? Thanks!

              aha_1980A 1 Reply Last reply
              0
              • Tom assoT Tom asso

                @aha_1980 - my version 4.8.1 only has "Views->Debugger Log", but I don't see the gdb command input anywhere in the displayed Debugger Log panes - do you see gdb command input in version 4.9? Thanks!

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Tom-asso

                After opening Window > Views > Debugger Log it is here:

                0_1558031001679_gdb-commands.png

                Regards

                Qt has to stay free or it will die.

                Tom assoT 1 Reply Last reply
                2
                • aha_1980A aha_1980

                  @Tom-asso

                  After opening Window > Views > Debugger Log it is here:

                  0_1558031001679_gdb-commands.png

                  Regards

                  Tom assoT Offline
                  Tom assoT Offline
                  Tom asso
                  wrote on last edited by
                  #8

                  @aha_1980 - great, thanks!

                  1 Reply Last reply
                  1
                  • M Offline
                    M Offline
                    martonmiklos
                    wrote on last edited by martonmiklos
                    #9

                    There are no Views menu under Window anymore in the QtCreator 14, however the Debugger log could be reached this way:

                    kép.png

                    Added for the shake of the posterity as It took me a while to figure this out.

                    1 Reply Last reply
                    2
                    • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on

                    • Login

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