PDB - stepping out of a function
Solution 1:
As mentioned by Arthur in a comment, you can use r(eturn)
to run execution to the end of the current function and then stop, which almost steps out of the current function. Then enter n(ext)
once to complete the step out, returning to the caller.
Documentation is here.
(Pdb) ?r
r(eturn)
Continue execution until the current function returns.
Solution 2:
step
will continue the execution. To move up and down the callstack, you can use up
(move up to the calling function), and then down
to go back the other way.
Have a look at the doc: https://docs.python.org/3.6/library/pdb.html#pdbcommand-step