Skip to content

Commit 1f5cc1e

Browse files
Add documentation and whatsnew entry for pdb exit change
1 parent fbaa6c8 commit 1f5cc1e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Doc/library/pdb.rst

Lines changed: 11 additions & 0 deletions
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:`BdbQuit` in
710+
the next trace event.
700711

701712
.. pdbcommand:: debug code
702713

Doc/whatsnew/3.14.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,11 @@ pdb
632632
command when :mod:`pdb` is in ``inline`` mode.
633633
(Contributed by Tian Gao in :gh:`123757`.)
634634

635+
* A confirmation prompt will be shown when the user tries to quit :mod:`pdb`
636+
in ``inline`` mode. ``y``, ``Y``, ``<Enter>`` or ``EOF`` will confirm
637+
the quit and call :func:`sys.exit`, instead of raising :exc:`BdbQuit`.
638+
(Contributed by Tian Gao in :gh:`124704`.)
639+
635640

636641
pickle
637642
------

0 commit comments

Comments
 (0)