Closed
Description
Bug report
Bug description:
pdb.post_mortem
used to display the current stack entry before the command loop (which has been useful). With Python 3.13, this is no longer the case when there is a .pdbrc
file.
The reason is the following code in pdb.Pdb.interaction
:
# if we have more commands to process, do not show the stack entry
if not self.cmdqueue:
self.print_stack_entry(self.stack[self.curindex])
If a .pdbrc
exists, self.cmdqueue
contains the commands from this file and the current stack entry is not displayed.
I suggest the introduction of a new interaction
parameter show_stack_entry
(with default False
) and to display the current stack entry if it has a true value. Set it to True
in the _post_mortem
call of interaction
.
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
- gh-119824: Print stack entry when user input is needed #119882
- [3.13] gh-119824: Print stack entry when user input is needed (GH-119882) #120533
- [3.12] gh-119824: Print stack entry when user input is needed … #120594
- [3.13] gh-119824: Revert the
where
solution and use meta commands #120919 - [3.12] gh-119824: Revert the where solution and use meta commands #120928