[Tutor] Python Debugger shortcut to go to the last frame
AS
f32 at inbox.ru
Tue Apr 24 07:59:20 EDT 2018
Hi
Please consider the following script:
#!/usr/bin/env python3.6
#pdb_last_frame.py
import pdb
def recursive_function(n=5, output='default print'):
if n > 0:
recursive_function(n - 1)
else:
pdb.set_trace()
print(output)
return
if __name__ == '__main__':
recursive_function("space ham")
For instance we run it as
python3.6 -m pdb pdb_last_frame.py
The following command sequence applied once the script stopped on bp:
u
u
The question is there any command to go directly to the last frame instead of typing d d ?
Thank you in advance.
More information about the Tutor
mailing list