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 .
Use the debugger in Rational® Developer
for i. This
is the recommended method and documentation about debugging programs appears
in that product's online help. You can debug your
program running on the IBM® i from a
graphical user interface on your workstation.
You can also set breakpoints directly in your source before running the debugger.
The integrated Rational Developer
for i user interface
also enables you to control program
execution. For example, you can run your program, set line, watch, and service
entry point breakpoints, step through program instructions, examine variables,
and examine the call stack. You can also debug multiple applications, even
if they are written in different languages, from a single window. Each session
you debug is listed separately in the Debug view. 
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.
See the chapter on debugging in ILE Concepts for more information on the ILE source (including authority required to debug a program or service program and the effects of optimization levels).
You will see the source again, with your breakpoint line highlighted .
After setting breakpoints, you do not have to call the program directly. You can start an application that will eventually call the program.
If you step through the whole program, it will step through the Input and Output specifications. If you prefer to skip over Input and Output specifications, you can specify OPTION(*NODEBUGIO) in your Header specification or when you compile your program.
More details on these steps will be given in the rest of this chapter.