Passing a frame to pdb.Pdb.set_trace

Rotwang sg552 at hotmail.co.uk
Wed Jun 25 16:59:22 EDT 2014


On 24/06/2014 20:10, Rotwang wrote:
> Hi all, I've found something weird with pdb and I don't understand it. I
> want to define a function mydebugger() which starts the debugger in the
> caller's frame. The following is copied from IDLE with Python 2.7.3
> (I've since tried it with 3.3.0 and the same thing happens):
>
> [...]

Never mind, I figured out what's going on thanks to an excellent article 
by Ned Batchelder explaining the internals of pdb:

http://nedbatchelder.com/text/trace-function.html



More information about the Python-list mailing list