The Python 2.7 debugger pdb
allows to display lines o
to p
with l [o[,p]]
, but one has to figure out which line the debugger stand on and then substract and add. Is there a way to display an m
lines before and n
lines after the current line without arithmetics?
As far as I know, no. The l(ist)
command will display 11 lines around the current line, but you can't display m
lines before and n
after the current line.
https://docs.python.org/2/library/pdb.html
l(ist) [first[, last]] List source code for the current file. Without arguments, list 11 lines around the current line or continue the previous listing. With one argument, list 11 lines around at that line. With two arguments, list the given range; if the second argument is less than the first, it is interpreted as a count.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With