4.12.1 Using IBM i Debug Mode
The IBM i operating system DEBUG facility can be used on any function compiled by LANSA in exactly the same way as it would be used on a normal application program. The only restriction is that the function must have been compiled with debug "enabled". Refer to the section on compiling processes for more information about this option.
To use IBM i DEBUG on a function compiled by LANSA it will also be necessary to have a source listing of the associated RPG program. Refer to the section on compiling processes for details of how this is obtained.
From the RPG listing of the program associated with a function, two pieces of information are required to successfully use IBM i DEBUG:
- The first is the name of the program and the library in which it resides. The program name is internally generated and has nothing to do with the function name. These are required to enable you to place the program in debug mode.
- The second is the RPG source statement numbers. These are required to enable you to specify when the program should stop at a "breakpoint" to display or change the content of fields.
It is beyond the scope of this guide to describe the IBM i DEBUG facilities in any detail. Refer to the appropriate IBM supplied reference manual for specific information on how to use them.