You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pdb: "until" does not step over a list comprehension with a breakpoint set on it #152373
When a breakpoint is set on a line that holds a list comprehension (or any
single-line loop), the until command stops on that same line again on every
iteration instead of moving past it.
$ python -m pdb repro.py
> repro.py(1)<module>()
-> def f():
(Pdb) break 2
Breakpoint 1 at repro.py:2
(Pdb) continue
> repro.py(2)f()
-> lst = [i for i in range(10)]
(Pdb) until
> repro.py(2)f()
-> lst = [i for i in range(10)]
(Pdb) until
> repro.py(2)f()
-> lst = [i for i in range(10)]
until keeps stopping on line 2, once per comprehension element.
Expected: until moves past the comprehension to the next line, the way next
and step already do (gh-136057, gh-136160). This also matches gdb, which pdb's until is borrowed from: there, until steps past a single-line loop
to the next line even with a breakpoint set on it, instead of stopping on each
iteration.
Activity
gh-152373: Make pdb "until" step over a list comprehension with a bre…
[3.15] gh-152373: Make pdb "until" step over a list comprehension wit…
[3.14] gh-152373: Make pdb "until" step over a list comprehension wit…