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, step over / step out, intended behaviour

Debugging, step over / step out, intended behaviour

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qtcreator debugdebugdebuggingqtcreatorqtcreator 8.0.2
2 Posts 2 Posters 537 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.
  • M Offline
    M Offline
    MHuysmans
    wrote on 15 Nov 2022, 10:46 last edited by
    #1

    Just to illustrate let's say I have a class Foo that has a function, bar(), that returns an object of class Baz that has a function qux().

    When debugging the line:

    Foo.bar().qux();
    

    step into will get me to the bar() call as expected.
    Stepping out of the bar() call will make me return to the " Foo.bar().qux(); " line, and I can step into the qux() call of the Baz object.
    However, when from within the bar() call I step over until the bar() call returns, I will end up after the " Foo.bar().qux(); " line.

    Is this intended behaviour? It seems weird to me a step over will bring me further in the code than a step out.

    This was in Qt Creator 8.0.2.

    J 1 Reply Last reply 15 Nov 2022, 12:16
    0
    • M MHuysmans
      15 Nov 2022, 10:46

      Just to illustrate let's say I have a class Foo that has a function, bar(), that returns an object of class Baz that has a function qux().

      When debugging the line:

      Foo.bar().qux();
      

      step into will get me to the bar() call as expected.
      Stepping out of the bar() call will make me return to the " Foo.bar().qux(); " line, and I can step into the qux() call of the Baz object.
      However, when from within the bar() call I step over until the bar() call returns, I will end up after the " Foo.bar().qux(); " line.

      Is this intended behaviour? It seems weird to me a step over will bring me further in the code than a step out.

      This was in Qt Creator 8.0.2.

      J Offline
      J Offline
      JonB
      wrote on 15 Nov 2022, 12:16 last edited by
      #2

      @MHuysmans
      I think it is intended behaviour. But whatever it should have nothing to do with Qt Creator. That is only a front-end to whatever debugger you use. Which you don't say. So go test this behaviour in the debugger, e.g. gdb with step and next commands.

      1 Reply Last reply
      0

      1/2

      15 Nov 2022, 10:46

      • Login

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