Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
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
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
4 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 pdb[-c command] (-m module | pyfile) [args ...] | ||
donBarbos marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
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. | ||
.. option:: -c, --command <command> | ||
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:: | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.