Debugging, step over / step out, intended behaviour
-
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.
-
@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
withstep
andnext
commands.