[issue30761] pdb: Add step / next count arguments

Xavier de Gaye report at bugs.python.org
Mon Jun 26 11:20:29 EDT 2017


Xavier de Gaye added the comment:

Thanks for this PR Louie, adding count to the pdb commands is useful.

With gdb a very common use case is to set a breakpoint where the code runs very frequently and when only interested in the N(th) execution of this code, to enter the breakpoint command list:

(gdb) commands
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>silent
>continue <N - 1>
>end
(gdb)

PR 2399 does not handle this case for pdb:
* The 'count' option for the 'continue' command is not implemented.
* The implementation of the 'count' option for 'next' and 'step' does not handle breakpoint command lists (I think).
IMO it is difficult to handle this option for breakpoint command lists directly in pdb.py, but it could be done in bdb.py, adding a keyword argument to set_continue() et al.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30761>
_______________________________________


More information about the Python-bugs-list mailing list