There is no structured debugger that works with CSPro. However, there are several techniques that can be used to find problems and solve them. One technique is to "comment out" code. By enclosing specific code between
multiline comments /* */, you can isolate specific areas of code that may be the cause of your problem.
Another technique is to use error messages with the
errmsg function. The generation of an error message tells you that program control has passed to that point in your application. The error message can also include variable values to indicate the status of those variables at that point.
It may sound obvious, but it is good programming technique to
indent your code. This will help you find problems caused by unterminated
if or
do statements, for example. If you consistently indent (or tab) the content within any control structure, finding a lost
endif or
enddo will be much easier.
You can also use the
trace function to determine problems in your application by outputting messages to a separate window or file rather than have them appear onscreen as they would with error messages.