I use the compile option (CRTSQLCBLI) of ‘DBGVIEW *SOURCE’.
I use STRDBG, and be sure to change the following option to ‘UPDPROD *YES’ .
You can specify breakpoints, and watch variables.
Hope this helps.
A program compiled with the *SRCDBG option requires there to be a source file in the location from which the program was compiled in order to view and step through the source when debugging.
*LSTDBG stores a copy of the source code with the object so that the source doesn’t need to be present when the program is debugged. This is quite useful when a production program is on a different system than from where it was originally developed and/or if the source code is not distributed to the production system. Thus, we have our change management system set to compile all program objects with the *LSTDBG or *LIST options, depending on program type. Also, *LSTDBG shows the file field definitions and the copy members/copy books in the source code when debugging. This is also useful since you won’t have to scan through a different source member while debugging the object if you’re looking for something that’s not in the main program source code.