https://github.com/python/cpython/commit/28406cd0a1adf0515ddb9497e94082b96bfb1415
commit: 28406cd0a1adf0515ddb9497e94082b96bfb1415
branch: 3.13
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: gaogaotiantian <gaogaotiant...@hotmail.com>
date: 2025-03-09T16:15:41Z
summary:

[3.13] gh-130160: use `.. program::` directive for documenting `pdb` CLI 
(GH-130996) (#131014)

gh-130160: use `.. program::` directive for documenting `pdb` CLI (GH-130996)
(cherry picked from commit c240c2d88a080fc3c68c220aa81062cf5f130ab9)

Co-authored-by: donBarbos <donbar...@proton.me>

files:
M Doc/library/pdb.rst

diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst
index 50cafc1e2d823d..15a9d7eec1b75b 100644
--- a/Doc/library/pdb.rst
+++ b/Doc/library/pdb.rst
@@ -75,10 +75,12 @@ The debugger's prompt is ``(Pdb)``, which is the indicator 
that you are in debug
    arguments of the ``p`` command.
 
 
+.. program:: pdb
+
 You can also invoke :mod:`pdb` from the command line to debug other scripts.  
For
 example::
 
-   python -m pdb myscript.py
+   python -m pdb [-c command] (-m module | pyfile) [args ...]
 
 When invoked as a module, pdb will automatically enter post-mortem debugging if
 the program being debugged exits abnormally.  After post-mortem debugging (or
@@ -86,14 +88,21 @@ after normal exit of the program), pdb will restart the 
program.  Automatic
 restarting preserves pdb's state (such as breakpoints) and in most cases is 
more
 useful than quitting the debugger upon program's exit.
 
-.. versionchanged:: 3.2
-   Added the ``-c`` option to execute commands as if given
-   in a :file:`.pdbrc` file; see :ref:`debugger-commands`.
+.. option:: -c, --command <command>
 
-.. versionchanged:: 3.7
-   Added the ``-m`` option to execute modules similar to the way
-   ``python -m`` does. As with a script, the debugger will pause execution just
-   before the first line of the module.
+   To execute commands as if given in a :file:`.pdbrc` file; see
+   :ref:`debugger-commands`.
+
+   .. versionchanged:: 3.2
+      Added the ``-c`` option.
+
+.. option:: -m <module>
+
+   To execute modules similar to the way ``python -m`` does. As with a script,
+   the debugger will pause execution just before the first line of the module.
+
+   .. versionchanged:: 3.7
+      Added the ``-m`` option.
 
 Typical usage to execute a statement under control of the debugger is::
 

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to