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. Debugger: any way to breakpoint after several loop iterations?
QtWS25 Last Chance

Debugger: any way to breakpoint after several loop iterations?

Scheduled Pinned Locked Moved Qt Creator and other tools
16 Posts 3 Posters 12.2k 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.
  • T Offline
    T Offline
    tobias.hunger
    wrote on last edited by
    #6

    No idea, I never used it:-) My guess is that it is passed directly to GDB, so it should be in whichever format GDB expects the condition.

    If you have questions on the debugger you better ask on the Qt Creator mailing list: The guys doing the debugger do hang out there but only very rarely read this forum.

    1 Reply Last reply
    0
    • mzimmersM Offline
      mzimmersM Offline
      mzimmers
      wrote on last edited by
      #7

      Hey, Tobias -

      I've obviated the original problem for now, but I'd like to know more about this:

      Just enter it into the top left area of the debugger mode (not 100% sure that is the right area, I have reordered stuff in my debug mode:-). You can interact with gdb normally there. Ctrl-Return will pass the command on to the debugger.

      My debugger window doesn't show any place for entering something to pass to the debugger. Can you tell me where this "lives?"

      Thanks.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #8

        The "debugger log" has the input area: It is the left one of the two text areas the log contains. It has a line edit labeled "Command".

        Press Ctrl-Enter to actually send the input on to the debugger.

        1 Reply Last reply
        0
        • mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #9

          Hmm...OK, all I have is two bare text areas. No labels, nothing in them except text that appears to be going to/coming from the debugger. The left area seems to contain commands, preceded by numbers, like this:

          bq. 1show version
          2set print static-members off
          3set breakpoint pending on
          4set print elements 10000
          5set overload-resolution off
          6handle SIGSEGV nopass stop print
          7set unwindonsignal on
          8set width 0
          9set height 0
          10-interpreter-exec console "maintenance set internal-warning quit no"

          But, typing in there and hitting ctrl-enter doesn't seem to do anything.

          Come to think of it, I'm not sure where the commands in the left area are coming from.

          1 Reply Last reply
          0
          • mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #10

            If anyone can help me figure out where the debugger input area is, I'd appreciate it. Here's a picture of my Qt window in debugging mode:

            !http://www.scopedin.com/images/qt.jpg(Qt window)!

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #11

              Hmmm... my creator has a input line beneath the top left of the aceas (the one with the 36-gdb-exit) to input commands in. IIRC that was added to make it more discoverable that you can actually send commands to the debugger which used to work before IIRC.

              Try typing into the top-left area and hitting Ctrl-Return.

              1 Reply Last reply
              0
              • mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by
                #12

                I'm pretty sure it won't accept anything, but I'll try. I'm a bit embarrassed to say, however, that I don't know how to use GDB directly, so I don't know what to type in there. What do you suggest?

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tobias.hunger
                  wrote on last edited by
                  #13

                  "google helps":http://www.lmgtfy.com/?q=gdb+manual...

                  1 Reply Last reply
                  0
                  • mzimmersM Offline
                    mzimmersM Offline
                    mzimmers
                    wrote on last edited by
                    #14

                    OK, I downloaded the manual (585 pages!) and tried a simple break command. Nothing. It echoed my input (including the line-break) in the left window, but nothing in the right window and the break didn't take.

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      Felix
                      wrote on last edited by
                      #15

                      you could just add an @if(i > 32) { qDebug() << "32";}@ in the loop and make a regular breakpoint in the if statement

                      1 Reply Last reply
                      0
                      • ? This user is from outside of this forum
                        ? This user is from outside of this forum
                        Guest
                        wrote on last edited by
                        #16

                        Mmm.... my approach to this would be using DDD (data display debugger? or sth like it) as an interface to GDB, then setting some breakpoints...

                        --

                        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