Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-130160: use.. program:: directive for documentingpdb CLI#130996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gaogaotiantian merged 4 commits intopython:mainfromdonBarbos:issue-130160-pdb
Mar 9, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletionsDoc/library/pdb.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,25 +75,34 @@ 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 pdbmyscript.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
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::

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp