Sometimes an application does not behave the way you think it will. Perhaps a variable is not being assigned the value you expect, or a script does not perform as desired. In these situations, you can examine your application by running it in debug mode.
When you run the application in debug mode, PowerBuilder stops execution before it executes a line containing a breakpoint (stop). You can then step through the application and examine its state.
To debug an application:
Open the debugger.
Set breakpoints at places in the application where you have a problem.
Run the application in debug mode.
When execution is suspended at a breakpoint, look at the values of variables, examine the properties of objects in memory and the call stack, or change the values of variables.
Step through the code line by line.
As needed, add or modify breakpoints as you run the application.
When you uncover a problem, fix your code and run it in the debugger again.