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:

You can also debug remote VSAM programs, but you must install Distributed File Manager (DFM) on your development workstation to do so. For more information, see EGL support for VSAM files.

At its simplest, debugging an EGL program involves the following:

Debugging with SQL

To debug a service that uses an SQL database, make sure you have completed the following steps:
  1. Define a driver; see Creating an SQL database connection.
  2. Select a specific database connection in Windows > Preferences > EGL > SQL Database Connections.
  3. Reference that connection in your build descriptor; see Using an SQL database connection at run time.

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.

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 commands. For more information on how build descriptor settings affect the EGL debugger, see How build descriptor settings affect the EGL debugger.


Feedback