Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/pdb.rst

    r2 r391  
    1 
    21.. _debugger:
    32
     
    2423The debugger is extensible --- it is actually defined as the class :class:`Pdb`.
    2524This is currently undocumented but easily understood by reading the source.  The
    26 extension interface uses the modules :mod:`bdb` (undocumented) and :mod:`cmd`.
     25extension interface uses the modules :mod:`bdb` and :mod:`cmd`.
    2726
    2827The debugger's prompt is ``(Pdb)``. Typical usage to run a program under control
     
    8079   (Pdb)
    8180
     81
    8282The module defines the following functions; each enters the debugger in a
    8383slightly different way:
    84 
    8584
    8685.. function:: run(statement[, globals[, locals]])
     
    127126.. function:: pm()
    128127
    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
     132The ``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
     134access 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.
    130160
    131161
     
    210240   arguments are the same as break.
    211241
    212 cl(ear) [*bpnumber* [*bpnumber ...*]]
     242cl(ear) [*filename:lineno* | *bpnumber* [*bpnumber ...*]]
     243   With a *filename:lineno* argument, clear all the breakpoints at this line.
    213244   With a space separated list of breakpoint numbers, clear those breakpoints.
    214245   Without argument, clear all breaks (but first ask confirmation).
     
    361392q(uit)
    362393   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.