[Python-Dev] pdb: should next command be extended?

Ilya Sandler ilya at bluefir.net
Sun Aug 7 22:38:00 CEST 2005


Problem:
  When the code contains list comprehensions (or for that matter any other
looping construct), the only way to get quickly through this code in pdb
is to set a temporary breakpoint on the line after the loop, which is
inconvenient..
There is a SF bug report #1248119 about this behavior.

Solution:

Should pdb's next command accept an optional numeric argument? It would
specify how many actual lines of code (not "line events")
should  be skipped in the current frame before stopping,

i.e "next 5" would mean stop when
   line>=line_where_next_N_happened+5
is reached.

This would allow to easily get over/out of loops in the debugger

What do you think?

Ilya


More information about the Python-Dev mailing list