How to list current line in pdb?

C

Chris Lasher

Hi all,

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?

Thanks,
Chris
 
D

Duncan Booth

Chris Lasher said:
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.
 
C

Chris Lasher

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top