~ubuntu-branches/ubuntu/karmic/python3.0/karmic

« back to all changes in this revision

Viewing changes to Doc/library/pdb.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-16 17:18:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090216171823-1d5cm5qnnjvmnzzm
Tags: 3.0.1-0ubuntu1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
   (Pdb) continue
38
38
   NameError: 'spam'
39
39
   > <string>(1)?()
40
 
   (Pdb) 
 
40
   (Pdb)
41
41
 
42
42
:file:`pdb.py` can also be invoked as a script to debug other scripts.  For
43
43
example::
65
65
   >>> pdb.pm()
66
66
   > ./mymodule.py(3)test2()
67
67
   -> print(spam)
68
 
   (Pdb) 
 
68
   (Pdb)
69
69
 
70
70
The module defines the following functions; each enters the debugger in a
71
71
slightly different way:
105
105
 
106
106
.. function:: post_mortem([traceback])
107
107
 
108
 
   Enter post-mortem debugging of the given *traceback* object.  If no 
 
108
   Enter post-mortem debugging of the given *traceback* object.  If no
109
109
   *traceback* is given, it uses the one of the exception that is currently
110
110
   being handled (an exception must be being handled if the default is to be
111
111
   used).