This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: In pdb using "until X" doesn't seem to have effect in commands
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, vyktor, xdegaye
Priority: normal Keywords:

Created on 2015-05-07 11:31 by vyktor, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
test.py vyktor, 2015-05-09 15:40
minimal.py vyktor, 2015-05-09 15:49 Minmal reproducable example
Messages (5)
msg242711 - (view) Author: vyktor (vyktor) Date: 2015-05-07 11:31
When using pdb -m pdb test.py and entering:

(Pdb) b A.f
Breakpoint 1 at d:\tmp\stack\test.py:8
(Pdb) commands 2
(com) disable 2
(com) until 13
(com) end

Until doesn't seem to have any effect. When statement is executed manually, everything works as expected (execution halts before implicit return from function).
msg242800 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2015-05-09 08:48
test.py is missing.
msg242813 - (view) Author: vyktor (vyktor) Date: 2015-05-09 15:40
Adding test.py, but according to docs https://docs.python.org/3.2/library/pdb.html#pdbcommand-commands

"Specifying any command resuming execution (currently continue, step, next, return, jump, quit and their abbreviations) terminates the command list (as if that command was immediately followed by end). "

This is probably expected behavior.
msg242816 - (view) Author: vyktor (vyktor) Date: 2015-05-09 15:49
In here:

> /home/vyktor/src/error/minimal.py(1)<module>()
-> print('1')
(Pdb) break 2
Breakpoint 1 at /home/vyktor/src/error/minimal.py:2
(Pdb) commands 1
(com) print('Triggered bp 1')
(com) until 4
(com) end
(Pdb) cont
1
Triggered bp 1
> /home/vyktor/src/error/minimal.py(2)<module>()
-> print('2')
(Pdb) 


until has no effect.

Expected behavior would be executing print 2 and 3.
msg242837 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2015-05-09 19:41
The bug occurs also on the default branch:
'3.5.0a4+ (default:8bac00eadfda, May  6 2015, 17:40:12) \n[GCC 4.9.2 20150304 (prerelease)]'

The reason is that 'do_until' is missing from the
Pdb.commands_resuming list, which causes the Pdb.bp_commands() method
to invoke the interaction function _cmdloop() after having processed
all the breakpoint commands instead of returning from the trace
function, so that the settings made by set_until() are lost.
History
Date User Action Args
2022-04-11 14:58:16adminsetgithub: 68328
2015-05-09 19:41:21xdegayesetmessages: + msg242837
2015-05-09 15:49:21vyktorsetfiles: + minimal.py

messages: + msg242816
2015-05-09 15:40:33vyktorsetfiles: + test.py

messages: + msg242813
2015-05-09 08:48:25xdegayesetnosy: + xdegaye
messages: + msg242800
2015-05-07 18:33:28ned.deilysetnosy: + georg.brandl
2015-05-07 11:31:04vyktorcreate