4.2 Compiling and Linking to Prepare for Debugging
The following example shows how to compile and link a
BASIC program (consisting of a single compilation unit
named INVENTORY) so that subsequently you will be able to
use the debugger:
$ BASIC/DEBUG INVENTORY
$ LINK/DEBUG INVENTORY
The /DEBUG qualifier with the BASIC command instructs
the compiler to write the debug symbol records associated
with INVENTORY into the object module, INVENTORY.OBJ.
These records allow you to use the names of variables and
other symbols declared in INVENTORY in debugger com-
mands. (If your program has several compilation units, you
must compile each unit that you want to debug with the
/DEBUG qualifier.)
The /DEBUG qualifier with the LINK command instructs the
linker to include all symbol information that is contained in
INVENTORY.OBJ in the executable image. The qualifier also
causes the OpenVMS image activator to start the debugger at
run time. (If your program has several object modules, you
may need to specify other modules in the LINK command.)