-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
According to the documentation:
With no bpnumber argument, commands refers to the last breakpoint set.
I think the intended meaning should be the last available breakpoint. However, when using the commands command without specifying a breakpoint number, if the most recently created breakpoint has been deleted, the current behavior throws an error stating "Breakpoint N already deleted".
main.py:
foo = 1
bar = 2➜ ./python -m pdb main.py
> /cpython/main.py(2)<module>()
-> foo = 1
(Pdb) b 3
Breakpoint 1 at /cpython/main.py:3
(Pdb) b 2
Breakpoint 2 at /cpython/main.py:2
(Pdb) clear 2
Deleted breakpoint 2 at /cpython/main.py:2
(Pdb) commands # should set command on breakpoint 1
*** cannot set commands: Breakpoint 2 already deletedCPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
johnslavik
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error