How to list current line in pdb?

Chris Lasher chris.lasher at gmail.com
Fri Mar 23 13:50:15 EDT 2007


On Mar 23, 11:56 am, Duncan Booth <duncan.bo... at invalid.invalid>
wrote:
> "Chris Lasher" <chris.las... 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.

Alright. Thanks, Duncan!




More information about the Python-list mailing list