When pdb / ipdb is used post-mortem, it turns you into an interactive shell where you can explore the environment in the stack frame of the deepest nested code. I’m usually not interested in a situation where several levels fall into some kind of library. I am interested in my function because it really caused the problem. Therefore, most of the time I have to press "u" several times to return to the level of code that I wrote.
Is there a way so I can go to the “top” to speed it up? Or better yet, a shortcut to go straight to a specific frame in the stack?
(By the way, the stack looks a bit “upside down” for me here. A function that calls another function puts a new call to the top of the stack, right? I feel like the pdb u (p) command actually moves you to the stack ...)
source
share