j or jump: Forces the debugger to jump to the line of code specified as an argument.
➤
➤
l or list: Displays the specified lines of code. If you don’t supply any arguments with the com-
mand, the debugger displays 11 lines of code starting with the current line. When you supply
just a starting point (a code line number), the debugger displays 11 lines of code starting with
the starting point you specify. To control the listing completely, supply both a starting and
ending point.
➤
➤
n or next: Continues execution to the next line of code. If the current line of code is a function,
the debugger executes all of the code within the function and stops at the next line of code in
the current function. In sum, this command works much like a step over command in most
other debuggers. (See return, step, and until for other stepping commands.)
p:
➤
➤
Prints the value of an expression as the debugger sees it. Don’t confuse this command with
the IronPython
print()
function, which prints an expression based on how IronPython sees it.
➤
➤
pp: Performs a pretty print. Essentially, this command is the same as the
p
command, except
that the debugger interprets any control characters within the output so that the output
appears with line feeds, carriage returns, tabs, and other formatting in place.
➤
➤
r or return: Continues execution until the current function returns. This command works
much like a step out command in most other debuggers (see next, step, and until for other
stepping commands).
➤
➤
restart: Restarts the current application at the beginning so that you can retest it. The com-
mand lets you supply optional arguments that appear as part of the
sys.argv
attribute. This
command preserves debugger history, breakpoints, actions, and options.
➤
➤
run: Starts the application when used within Python as demonstrated earlier in this sec-
tion. However, this command is simply an alias for restart when used within the debugger
environment.
➤
➤
s or step: Executes the current line of code and then moves to the next line of code, even if
that line of code appears within another function. This command works much like a step into
command in most other debuggers (see next, return, and until for other stepping commands).
➤
➤
tbreak: Performs precisely like a break command, except that the debugger removes the
breakpoint when the debugger stops at it the first time. This is a useful command when you
want to execute a breakpoint just one time.
548592c12.indd 259
2/24/10 12:48:49 PM
www.finebook.ir
Do'stlaringiz bilan baham: |