summaryrefslogtreecommitdiffstats
path: root/Doc/library/pdb.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-12-04 16:00:47 (GMT)
committerGeorg Brandl <georg@python.org>2010-12-04 16:00:47 (GMT)
commit44f2b640ff0260f5e338e41ad3a2d13185396979 (patch)
treea448ea5dea9367826b6d7e325c1487395c704fe8 /Doc/library/pdb.rst
parent1ed77f300b713166b0508eacd183c32f1d7437b2 (diff)
downloadcpython-44f2b640ff0260f5e338e41ad3a2d13185396979.zip
cpython-44f2b640ff0260f5e338e41ad3a2d13185396979.tar.gz
cpython-44f2b640ff0260f5e338e41ad3a2d13185396979.tar.bz2
#7245: Add a SIGINT handler on continue in pdb that allows to break a program again by pressing Ctrl-C.
Diffstat (limited to 'Doc/library/pdb.rst')
-rw-r--r--Doc/library/pdb.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst
index db21d1f..959fde1 100644
--- a/Doc/library/pdb.rst
+++ b/Doc/library/pdb.rst
@@ -135,7 +135,8 @@ The ``run_*`` functions and :func:`set_trace` are aliases for instantiating the
:class:`Pdb` class and calling the method of the same name. If you want to
access further features, you have to do this yourself:
-.. class:: Pdb(completekey='tab', stdin=None, stdout=None, skip=None)
+.. class:: Pdb(completekey='tab', stdin=None, stdout=None, skip=None, \
+ nosigint=False)
:class:`Pdb` is the debugger class.
@@ -146,6 +147,11 @@ access further features, you have to do this yourself:
patterns. The debugger will not step into frames that originate in a module
that matches one of these patterns. [1]_
+ By default, Pdb sets a handler for the SIGINT signal (which is sent when the
+ user presses Ctrl-C on the console) when you give a ``continue`` command.
+ This allows you to break into the debugger again by pressing Ctrl-C. If you
+ want Pdb not to touch the SIGINT handler, set *nosigint* tot true.
+
Example call to enable tracing with *skip*::
import pdb; pdb.Pdb(skip=['django.*']).set_trace()
@@ -153,6 +159,10 @@ access further features, you have to do this yourself:
.. versionadded:: 3.1
The *skip* argument.
+ .. versionadded:: 3.2
+ The *nosigint* argument. Previously, a SIGINT handler was never set by
+ Pdb.
+
.. method:: run(statement, globals=None, locals=None)
runeval(expression, globals=None, locals=None)
runcall(function, *args, **kwds)