summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMario Corchero <mariocj89@gmail.com>2018-01-06 07:53:05 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2018-01-06 07:53:05 (GMT)
commit9f1e5f1b7f074e026843a5d70834233a95a6bf9d (patch)
tree80ec106fce0fcac6825a310881e4eb102aae7e9f /Doc/library
parent735ae8d139a673b30b321dc10acfd3d14f0d633b (diff)
downloadcpython-9f1e5f1b7f074e026843a5d70834233a95a6bf9d.zip
cpython-9f1e5f1b7f074e026843a5d70834233a95a6bf9d.tar.gz
cpython-9f1e5f1b7f074e026843a5d70834233a95a6bf9d.tar.bz2
bpo-32206: Pdb can now run modules (GH-4752)
Add a new argument "-m" to the pdb module to allow users to run `python -m pdb -m my_module_name`. This relies on private APIs in the runpy module to work, but we can get away with that since they're both part of the standard library and can be updated together if the runpy internals get refactored.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/pdb.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst
index 4f3148f..e81c195 100644
--- a/Doc/library/pdb.rst
+++ b/Doc/library/pdb.rst
@@ -61,6 +61,12 @@ useful than quitting the debugger upon program's exit.
:file:`pdb.py` now accepts a ``-c`` option that executes commands as if given
in a :file:`.pdbrc` file, see :ref:`debugger-commands`.
+.. versionadded:: 3.7
+ :file:`pdb.py` now accepts a ``-m`` option that execute modules similar to the way
+ ``python3 -m`` does. As with a script, the debugger will pause execution just
+ before the first line of the module.
+
+
The typical usage to break into the debugger from a running program is to
insert ::