summaryrefslogtreecommitdiffstats
path: root/Doc/library/pdb.rst
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2017-09-22 16:29:42 (GMT)
committerGitHub <noreply@github.com>2017-09-22 16:29:42 (GMT)
commit35425d638c0eeb8377620e016f47df3ae08d7061 (patch)
treea45cb506202bf162807a90d1d1ff81f64965c693 /Doc/library/pdb.rst
parentb1558a0368949714f5765702a8d83a2d163eaacf (diff)
downloadcpython-35425d638c0eeb8377620e016f47df3ae08d7061.zip
cpython-35425d638c0eeb8377620e016f47df3ae08d7061.tar.gz
cpython-35425d638c0eeb8377620e016f47df3ae08d7061.tar.bz2
bpo-31389 Add an optional `header` argument to pdb.set_trace() (#3438)
* Give pdb.set_trace() an optional `header` argument * What's new. * Give pdb.set_trace() an optional `header` argument * What's new.
Diffstat (limited to 'Doc/library/pdb.rst')
-rw-r--r--Doc/library/pdb.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst
index 6225a3a..c5d4181 100644
--- a/Doc/library/pdb.rst
+++ b/Doc/library/pdb.rst
@@ -118,11 +118,15 @@ slightly different way:
is entered.
-.. function:: set_trace()
+.. function:: set_trace(*, header=None)
- Enter the debugger at the calling stack frame. This is useful to hard-code a
- breakpoint at a given point in a program, even if the code is not otherwise
- being debugged (e.g. when an assertion fails).
+ Enter the debugger at the calling stack frame. This is useful to hard-code
+ a breakpoint at a given point in a program, even if the code is not
+ otherwise being debugged (e.g. when an assertion fails). If given,
+ ``header`` is printed to the console just before debugging begins.
+
+ .. versionadded:: 3.7
+ The keyword-only argument ``header``.
.. function:: post_mortem(traceback=None)