Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-11330

Allow debug to “step into” (virtual) slot from signal emit

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • None
    • None
    • Debugger
    • None

    Description

      When using "step by step" debugging, specifically "Step Over" and "Step Into", reaching a "emit" sentence and wanting to follow its execution (assuming a direct connection) means having to go through the moc file of the sender, then the big "QMetaObject::activate" method until the "callFunction()" line, then the moc file of the receiver, and then (at last!) the destination slot, which most of the time was the desired "next step" in the debugging process. This is not a huge problem, but it is a huge inconvenience.

      So far the most obvious way of stepping into slots is to manually keeping track of all the connections previously done between objects, and/or setting breakpoints inside the destination slots, but this is a totally manual approach which doesn't scale well when working with a big or huge code base, making use of virtual slots and complex logic for connection-disconnection of objects. Nor spreading QSignalSpy instances all around, which is not feasible given the size of the code (and the fact that those are not actually need for the logic of the program in use).

      Given that GDB (or whatever debugger is being used under the hood) won't understand Qt-specific semantics, my suggestion is to add specific support for such a feature in the debugging module of Qt Creator.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            oneorjuan Juan Navarro
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes