Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
This behaviour is new in Python 3.14. It is defined in the pdb.Pdb.do_quit method, with the following comment: Show prompt to kill process when in 'inline' mode and if pdb was not started from an ...
#1: Initial revision
This behaviour is new in Python 3.14. It is defined in the `pdb.Pdb.do_quit` method, with the following comment: > Show prompt to kill process when in 'inline' mode and if pdb was not started from an interactive console. The attribute sys.ps1 is only defined if the interpreter is in interactive mode. If neither of these conditions is met, pdb delegates to the `bdb.Bdb.set_quit` method, which does not contain a prompt. [The Python documentation says](https://docs.python.org/3.14/library/pdb.html): > The _mode_ argument specifies how the debugger was invoked. It impacts the workings of some debugger commands. Valid values are `'inline'` (used by the breakpoint() builtin), `'cli'` (used by the command line invocation) or `None` (for backwards compatible behaviour, as before the mode argument was added). So, one solution would be overriding `breakpoint()` so that it invokes `pdb.Pdb` with `mode=None`, restoring the pre-3.14 quit behaviour. However, I'm not sure how to properly do that. As a hack, inserting `sys.ps1 = '>>> '` at some point before your `breakpoint()` invocation should also work.
