Changeset 391 for python/trunk/Doc/library/pdb.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/pdb.rst
r2 r391 1 2 1 .. _debugger: 3 2 … … 24 23 The debugger is extensible --- it is actually defined as the class :class:`Pdb`. 25 24 This is currently undocumented but easily understood by reading the source. The 26 extension interface uses the modules :mod:`bdb` (undocumented)and :mod:`cmd`.25 extension interface uses the modules :mod:`bdb` and :mod:`cmd`. 27 26 28 27 The debugger's prompt is ``(Pdb)``. Typical usage to run a program under control … … 80 79 (Pdb) 81 80 81 82 82 The module defines the following functions; each enters the debugger in a 83 83 slightly different way: 84 85 84 86 85 .. function:: run(statement[, globals[, locals]]) … … 127 126 .. function:: pm() 128 127 129 Enter post-mortem debugging of the traceback found in ``sys.last_traceback``. 128 Enter post-mortem debugging of the traceback found in 129 :data:`sys.last_traceback`. 130 131 132 The ``run*`` functions and :func:`set_trace` are aliases for instantiating the 133 :class:`Pdb` class and calling the method of the same name. If you want to 134 access further features, you have to do this yourself: 135 136 .. class:: Pdb(completekey='tab', stdin=None, stdout=None, skip=None) 137 138 :class:`Pdb` is the debugger class. 139 140 The *completekey*, *stdin* and *stdout* arguments are passed to the 141 underlying :class:`cmd.Cmd` class; see the description there. 142 143 The *skip* argument, if given, must be an iterable of glob-style module name 144 patterns. The debugger will not step into frames that originate in a module 145 that matches one of these patterns. [1]_ 146 147 Example call to enable tracing with *skip*:: 148 149 import pdb; pdb.Pdb(skip=['django.*']).set_trace() 150 151 .. versionadded:: 2.7 152 The *skip* argument. 153 154 .. method:: run(statement[, globals[, locals]]) 155 runeval(expression[, globals[, locals]]) 156 runcall(function[, argument, ...]) 157 set_trace() 158 159 See the documentation for the functions explained above. 130 160 131 161 … … 210 240 arguments are the same as break. 211 241 212 cl(ear) [*bpnumber* [*bpnumber ...*]] 242 cl(ear) [*filename:lineno* | *bpnumber* [*bpnumber ...*]] 243 With a *filename:lineno* argument, clear all the breakpoints at this line. 213 244 With a space separated list of breakpoint numbers, clear those breakpoints. 214 245 Without argument, clear all breaks (but first ask confirmation). … … 361 392 q(uit) 362 393 Quit from the debugger. The program being executed is aborted. 394 395 396 .. rubric:: Footnotes 397 398 .. [1] Whether a frame is considered to originate in a certain module 399 is determined by the ``__name__`` in the frame globals.
Note:
See TracChangeset
for help on using the changeset viewer.