debug ufo
and press Enter.
The Debugger launches the program and stops at main().
When you use debug prog_name to start a program
(as in Step 2), the Debugger always puts a breakpoint at
main(). In the Source window shown in the figure below, the
program is stopped at main().
Figure 1: Source window stopped at a breakpoint at main().
The startup screen should appear on the TV monitor after a short time.
TargetAction(pcUFO)as shown in the figure below.
The cross-hatch changes to a red bullet.
Figure 2: Location for setting a breakpoint.
When the program reaches the breakpoint in the while loop the
next time, it stops. You can now examine the program by stepping through
it.
UpdateDashboard().
UpdateDashboard().
Note: Step Over goes to the first executing instruction of a function. Step In goes to the next executable line and makes it possible to look at local variables and other function-internal information. Usually, you use Step In only to look at a particular function in detail.
Examining a structure and changing variable
values
The 3DO Debugger lets you look at structures, evaluate variables, and
dereference pointers in the Variables window. You can also change the
value of a variable and see the effect of the change on your program.
TargetAction() function.
TargetAction()
function, select pcTarget, then press Command-D to bring up a
Variables window.
Figure 3: Variables window invoked from a Source window.
Figure 4: Structure displayed in a Variables window.
ccb_Flags line to make it appear in the edit region.
Figure 5: Variable value selected for interactive change.
If you want to change the value back, set a breakpoint elsewhere and change the value, then release the breakpoint again.
ccb_XPOS line.
Figure 6: Display options pull-down menu in the Variables window.
ccb_XPOS line,
then press the Enter key.