Debugging EGL applications

Debugging is the process of monitoring the execution of a program to pinpoint the causes of errors. With the EGL debugger, you can set breakpoints (places for execution to pause), examine or change variables, and move through the program one step at a time. You can debug the following code:
The simplest case of debugging involves the following steps:

Debugging using JDBC for SQL access

The debugger uses JDBC for SQL access, which creates the following differences from running on environments where JDBC is not used:
The following limitations also apply to both Debug and Java™ programs. There is a difference between Debug and generated COBOL programs, but no difference between Debug and generated Java programs:

More sophisticated debugging involves launch configurations, breakpoints, database connections, setting variable values, and other concepts. For an overview, see Stepping through an application in the EGL debugger.

Debug environment different from host

There is a technique you can use when the debug environment is different from the host environment: In the EGL -> Debug preferences, select Set systemType to DEBUG. In the EGL program you can include logic such as the following:
	if (sysVar.systemType is debug) 	
	   // do nothing
	else
	   //  check for sysVar.sqlData.sqlCode = -811 
	end

This enables you to include system-specific logic that is only valid on the host system.

For information on the keyboard differences, see the EGL function key mapping table in validationBypassKeys or helpKey.

If the host environment uses a different code page from the workstation, you might also want to change the code page used in the debugger. For details, see Character encoding options for the EGL debugger.

Debugging programs

To debug programs that do not run under JEE, you can start the debug session as described in Stepping through an application in the EGL debugger.

For information on EGL debugger commands, see EGL debugger controls. For more information on how build descriptor settings affect the EGL debugger, see How build descriptor settings affect the EGL debugger.


Feedback