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: breakpoint() is ignored after quitting a previous session with q #160643
Since gh-138641 (#159918, shipped in 3.15.1 and backported to 3.14), Bdb.set_trace() returns early when self.enterframe is set. Bdb.set_enterframe() clears it after yield without try/finally, so when an exception escapes trace_dispatch(), for example BdbQuit after q in the interactive interpreter, enterframe stays set and every later breakpoint() is ignored.
# printf 'q\nq\nq\n' | python repro.pyimportsys, bdbsys.ps1='>>> '# as in the interactive interpreterdeff(i):
breakpoint()
returniforiinrange(3):
try:
print('call', i, '->', f(i))
exceptbdb.BdbQuit:
print('BdbQuit caught', i)
On 3.14.7 the debugger stops on every call. The same happens in a real REPL: call a function that has breakpoint(), type q, call it again, and it no longer stops.
Activity