Skip to content

Commit d3b60ff

Browse files
gh-124703: Add documentation and whatsnew entry for pdb exit change (#129818)
1 parent 718ab66 commit d3b60ff

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Doc/library/pdb.rst

+11
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,17 @@ can be overridden by the local file.
697697
.. pdbcommand:: q(uit)
698698

699699
Quit from the debugger. The program being executed is aborted.
700+
An end-of-file input is equivalent to :pdbcmd:`quit`.
701+
702+
A confirmation prompt will be shown if the debugger is invoked in
703+
``'inline'`` mode. Either ``y``, ``Y``, ``<Enter>`` or ``EOF``
704+
will confirm the quit.
705+
706+
.. versionchanged:: 3.14
707+
A confirmation prompt will be shown if the debugger is invoked in
708+
``'inline'`` mode. After the confirmation, the debugger will call
709+
:func:`sys.exit` immediately, instead of raising :exc:`bdb.BdbQuit`
710+
in the next trace event.
700711

701712
.. pdbcommand:: debug code
702713

Doc/whatsnew/3.14.rst

+5
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,11 @@ pdb
641641
command when :mod:`pdb` is in ``inline`` mode.
642642
(Contributed by Tian Gao in :gh:`123757`.)
643643

644+
* A confirmation prompt will be shown when the user tries to quit :mod:`pdb`
645+
in ``inline`` mode. ``y``, ``Y``, ``<Enter>`` or ``EOF`` will confirm
646+
the quit and call :func:`sys.exit`, instead of raising :exc:`bdb.BdbQuit`.
647+
(Contributed by Tian Gao in :gh:`124704`.)
648+
644649

645650
pickle
646651
------

0 commit comments

Comments
 (0)