How can I jump into my code in pdb in python rather than library code?

Viewed 21

I'm writing some code; to do this I am letting my code fail and using python -m pdb to inspect what's going on. But when I do so the code starts a few layers down in library code and then I have to go up through the stack trace with the u key, which is distracting me a little from debugging.

Is it possible to have pdb post mortem go to the point in the stack trace in my code rather than some library?

1 Answers

From the documentation (running python -m pdb):

To let the script run up to a given line X in the debugged file, use -c 'until X'.

Related