Skip to content

Commit 7f4d138

Browse files
committed
Revise trepan3k features
1 parent b224613 commit 7f4d138

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

README.rst

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ Abstract
88
========
99

1010
This is a gdb-like debugger for Python. It is a rewrite of *pdb* from
11-
the ground up.
11+
the ground up. It is both a high-level debugger as well as a
12+
lower-level bytecode debugger. By lower level debugger, I mean that it
13+
understands a lot about byte code and will try to make use of that in
14+
its normal higher-level instructions.
1215

1316
A command-line interface (CLI) is provided as well as an remote access
1417
interface over TCP/IP.
@@ -105,6 +108,30 @@ the code, use ``eval``. To evaluate text of a common fragment of line,
105108
such as the expression part of an *if* statement, you can do that with
106109
``eval?``. See eval_ for more information.
107110

111+
Function Breakpoints
112+
---------------------
113+
114+
Many Python debuggers only allow setting a breakpoint at a line event
115+
and functions are treated like line numbers. But functions and lines
116+
are fundamentally different. If I write::
117+
118+
def five(): return 5
119+
120+
this line means has three different kinds of things. First there is
121+
the code in Python that defines function ``five()`` for the first
122+
time. Then there is the function itself, and then there is some code
123+
inside that function.
124+
125+
In this debugger, you can give the name of a *function* by surrounding
126+
adding ``()`` at the end::
127+
128+
break five()
129+
130+
Also ``five`` could be a method of an object that is currently defined when the
131+
``breakpoint`` command is given::
132+
133+
self.five()
134+
108135
More Stepping Control
109136
---------------------
110137

0 commit comments

Comments
 (0)