When I run the following code to debug f:
import pdb
f = lambda x: x**2
pdb.runcall(f, 11) # type step, to step through code.
I get a prompt:
In this prompt I can enter commands, such as step
to step through the function of interest (e.g. f
).
Is there a way to automatically give the step
or other commands so I can automatically walk through the code, and do some automated (crude) line by line analysis?