Debugging outside of Eclipse

Note: This topic applies to UNIX environments only.

The IDE supplied with a Micro Focus development product contains a feature-rich debugging engine that will most likely give you the best debugging experience in most scenarios. However, these products also contain a command line debugging engine. The Character Animator served as the main debugging tool in legacy Micro Focus development product, but still exists today, and can be useful if you are required to debug from the command line.

The Character Animator can be used to debug local, native COBOL applications. For a full explanation of the features of Character Animator, see The Character Animator.

If you have set your environment for just-in-time debugging (by setting the debug_on_error tunable), Character Animator is invoked if a running program terminates with a run-time system error; similarly, a program executing a CBL_DEBUG_START command also invokes Character Animator. You can also invoke it manually whenever you run a program, by using the +A COBOL run-time switch; or if you want to invoke it on a per-program basis, run your programs with the anim command.

Using a run-time switch

To set the environment to invoke Character Animator every time that you run a debuggable program, set the +A run-time switch in the COBSW environment variable:
set COBSW=+A
export COBSW
You can also use the switch on a per-program basis by specifying it when running the program:
cobrun +A myprog.int
Remember: The program must be compiled for debugging beforehand.

Using the anim command

Similar to the last example, you can also use a dedicated command to invoke the Character Animator on a per-program basis:
anim myprog.int

The file types available to use with the Character Animator are: .int, .gnt, .so