02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7<br />

Debugger<br />

Moves one level down the stack. This is the converse of the button, and<br />

like it, affects the data you can see but not the state of your program.<br />

This button issues the down command, and has the same effect on a<br />

following finish or until command as down. The location of the<br />

temporary breakpoint that is set for finish or until depends on the selected<br />

frame, which is changed by down.<br />

Calls up an editor (specified by your EDITOR environment variable—or vi<br />

if EDITOR is not defined) on the current source file. To specify the starting<br />

context, drag the editor button to a line in the region you wish to edit,<br />

using the middle button on your mouse.<br />

Prints a symbol’s value in the command panel. Begin by left-clicking on<br />

the symbol of interest, in the program-display panel; the debugger<br />

highlights the symbol. Then press this button to display its value.<br />

This button issues the print command, and echoes the command and its<br />

output—the symbol value—to the command panel.<br />

Prints the value at a pointer location. This button has a similar effect to the<br />

print button above, except that it de-references the selected symbol. Use<br />

this button to inspect data when you have a pointer to the data, rather than<br />

the data itself.<br />

This button issues the print * command, and echoes the command and its<br />

output—the value at the selected pointer location—to the command<br />

panel.<br />

Launches an inspection window that monitors a symbol’s current value.<br />

This auxiliary display is automatically updated each time control returns<br />

to the debugger.<br />

Several different kinds of data-inspection windows are available,<br />

depending on data structure; the debugger chooses the right one<br />

automatically.<br />

Figure 7-11 shows the two simplest displays: for ordinary numeric data,<br />

and for a pointer. In both cases, the numeric value of the variable is<br />

displayed in a small independent window. The name of the variable being<br />

displayed appears next to the numeric value. The window’s title bar also<br />

shows the name of the variable displayed, preceded by a parenthesized<br />

display number. 2<br />

7<br />

The debugger indicates whether the displayed variable is a pointer, by<br />

placing an asterisk to its left (as with pNode in Figure 7-11). To follow a<br />

249

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!