Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 113 lines (71 sloc) 3.476 kb
1104f2d @inducer Make README as suggested by Aaron, read from setup.py for long_descri…
authored
1 PuDB is a full-screen, console-based visual debugger for Python.
2
3 Its goal is to provide all the niceties of modern GUI-based debuggers in a
4 more lightweight and keyboard-friendly package. PuDB allows you to debug code
5 right where you write and test it--in a terminal. If you've worked with the
6 excellent (but nowadays ancient) DOS-based Turbo Pascal or C tools, PuDB's UI
7 might look familiar.
8
9 Here's a screenshot:
10
11 .. image:: http://tiker.net/pub/pudb-screenshot.png
12
13 You may watch a `screencast <http://vimeo.com/5255125>`_, too.
14
15 Features
16 --------
17
18 * Syntax-highlighted source, the stack, breakpoints and variables are all
19 visible at once and continuously updated. This helps you be more aware of
20 what's going on in your program. Variable displays can be expanded, collapsed
21 and have various customization options.
22
23 * Simple, keyboard-based navigation using single keystrokes makes debugging
24 quick and easy. PuDB understands cursor-keys and Vi shortcuts for navigation.
25 Other keys are inspired by the corresponding pdb coomands.
26
27 * Use search to find relevant source code, or use "m" to invoke the module
28 browser that shows loaded modules, lets you load new ones and reload existing
29 ones.
30
31 * Breakpoints can be set just by pointing at a source line and hitting "b" and
32 then edited visually in the breakpoints window. Or hit "t" to run to the line
33 under the cursor.
34
35 * Drop to a Python shell in the current environment by pressing "!".
36
37 * PuDB places special emphasis on exception handling. A post-mortem mode makes
38 it easy to retrace a crashing program's last steps.
39
40 * IPython integration (see `wiki <http://wiki.tiker.net/PuDB>`_)
41
c838943 @inducer Add minimum Python version blurb.
authored
42 * Should work with Python 2.4 and newer, including Python 3.
43
1104f2d @inducer Make README as suggested by Aaron, read from setup.py for long_descri…
authored
44 Installing
45 ----------
46
47 Install PuDB using the command::
48
49 easy_install pudb
50
5869490 @inducer Change H to go to bottom of stack.
authored
51
52
1104f2d @inducer Make README as suggested by Aaron, read from setup.py for long_descri…
authored
53 Getting Started
54 ---------------
55
56 To start debugging, simply insert::
57
58 from pudb import set_trace; set_trace()
59
60 into the piece of code you want to debug, or run the entire script with::
61
62 python -m pudb.run my-script.py
63
127388b @inducer Support 'python -m pudb script.py' on 2.6+.
authored
64 In Python 2.6 and higher, you can save four keystrokes and type::
65
66 python -m pudb my-script.py
67
1104f2d @inducer Make README as suggested by Aaron, read from setup.py for long_descri…
authored
68 Documentation and Support
69 -------------------------
70
71 PuDB has a `wiki <http://wiki.tiker.net/PuDB>`_, where documentation and
72 debugging wisdom are collected.
73
74 PuDB also has a `mailing list <http://lists.tiker.net/listinfo/pudb>`_ that
75 you may use to submit patches and requests for help.
76
77 Programming PuDB
78 ----------------
79
80 At the programming language level, PuDB displays the same interface
81 as Python's built-in `pdb module <http://docs.python.org/library/pdb.html>`_.
82 Just replace `pdb` with `pudb`.
83 (One exception: `run` is called `runstatement`.)
84
85 License and Dependencies
86 ------------------------
87
88 PuDB is distributed under the MIT license. It relies on the following
89 excellent pieces of software:
90
91 * Ian Ward's `urwid <http://excess.org/urwid>`_ console UI library
92 * Georg Brandl's `pygments <http://pygments.org>`_ syntax highlighter
93
94 Development Version
95 -------------------
96
97 You may obtain the development version using the `Git <http://git-scm.org/>`_
98 version control tool.::
99
100 git clone http://git.tiker.net/trees/pudb.git
101
102 You may also `browse the code <http://git.tiker.net/pudb.git>`_ online.
103
5869490 @inducer Change H to go to bottom of stack.
authored
104 The repository is also mirrored at `github <https://github.com/inducer/pudb>`_.
105
1104f2d @inducer Make README as suggested by Aaron, read from setup.py for long_descri…
authored
106 FAQ
107 ---
108
109 **Q: I navigated to the Variables/Stack/Breakpoints view. How do I get
110 back to the source view?**
111
112 A: Press your left arrow key.
Something went wrong with that request. Please try again.