Справочник Пользователя для IBM AS/400

Скачать
Страница из 489
 
 
The ILE Source Debugger
 
 Chapter 11. Debugging Programs
Debugging allows you to detect, diagnose, and eliminate run-time errors in a
program. You can debug ILE and OPM programs using the ILE source debugger.
This chapter describes how to use the ILE source debugger to:
¹
Prepare your ILE RPG program for debugging
¹
Start a debug session
¹
Add and remove programs from a debug session
¹
View the program source from a debug session
¹
Set and remove breakpoints and watch conditions
¹
Step through a program
¹
Display and change the value of fields
¹
Display the attributes of fields
¹
Equate a shorthand name to a field, expression, or debug command
While debugging and testing your programs, ensure that your library list is changed
to direct the programs to a test library containing test data so that any existing real
data is not affected.
You can prevent database files in production libraries from being modified uninten-
tionally by using one of the following commands:
¹
Use the Start Debug (STRDBG) command and retain the default *NO for the
UPDPROD parameter
¹
Use the Change Debug (CHGDBG) command and specify the *NO value of the
UPDPROD parameter
¹
Use the SET debug command in the Display Module Source display and
specify UPDPROD NO
See the appendix on debugging in the 
CL Reference (Abridged) for more informa-
tion on preventing unintended modification of production files.
See the chapter on debugging in 
ILE Concepts for more information on the ILE
source debugger (including authority required to debug a program or service
program and the effects of optimization levels).
The ILE Source Debugger
The ILE source debugger is used to detect errors in and eliminate errors from
program objects and service programs. Using debug commands with any ILE
program that contains debug data you can:
¹
View the program source or change the debug view
¹
Set and remove breakpoints and watch conditions
¹
Step through a specified number of statements
¹
Display or change the value of fields, structures, and arrays
 Copyright IBM Corp. 1994, 1999 
 
163