How to list current line in pdb?

Duncan Booth duncan.booth at invalid.invalid
Fri Mar 23 11:56:23 EDT 2007


"Chris Lasher" <chris.lasher at gmail.com> wrote:

> Using the pdb shell, after repeatedly entering 'l' (lowercase 'L'),
> how do I jump back to listing the current line again if I don't
> remember exactly what line my current line is? Do I just have to list
> an early line in the code and repeatedly list from there until I see
> the '->' indicating the current line?

Try:

(Pdb) alias ll u;;d;;l


and thereafter the 'll' command will list the current line (unless you are 
in the uppermost stack frame in which case it goes down one stackframe 
instead).

Save the alias in your .pdbrc file.



More information about the Python-list mailing list