Prerequisites to run the debugger

Some requirements are needed before running the integrated debugger.

FGLPROFILE fglrun.ignoreDebuggerEvent option

By default, fglrun processes can be stopped with the SIGTRAP signal on UNIX-like systems, or with the CTRL_BREAK_EVENT signal on Microsoft™ Windows® systems. These signals are used by tools such as fgldb, to attach to a running program for a debug session.

The FGLPROFILE configuration option fglrun.ignoreDebuggerEvent allows you to disable the detection of the debugger attachment signal. It is good practice to disable this feature in production environments, by setting that option to true:
fglrun.ignoreDebuggerEvent = true

Disabling the detection of the debugger attachment signal does not prevent to start the runtime system directly in debug mode, with fglrun -d.

Source file search path (FGLSOURCEPATH)

Before starting the debugger, make sure you have properly set the FGLLDPATH and FGLSOURCEPATH environment variable to let the debugger find the source files.

To find source files, the debugger will search in the directories defined by FGLLDPATH. If the source file is not found, the search continues in the directories defined by FGLSOURCEPATH.

The FGLSOURCEPATH environment variable is provided to distinguish execution directories (containing .42m files) from source directories (containing .4gl files), when the sources are not located in the same directory as the pcode files.

UNIX™ example:
$ FGLSOURCEPATH="/usr/app/source:/home/scott/sources"
$ export FGLSOURCEPATH
Windows example:
C:\> set FGLSOURCEPATH=C:\app\sources;C:\scott\sources