Background Debugging with an xterm

With a properly configured X Window System, you can debug programs executing in background mode (with the "-b" runtime flag) by specifying that debugging I/O be sent to an xterm window on a specified X server. Use the following procedures:

  1. Set the DISPLAY environment variable on the system executing the program to point to a valid X server. This setting must be made before the runtime is invoked.
  2. Give the user executing the program rights to start an xterm on the specified X server.
  3. Modify the PATH environment variable on the system executing the program to point to the xterm directory.
  4. Add both the "-b" and the "d" flags to the runtime command line.

Use the standard debugging commands described in the rest of this section to manage your debug session.

Some users may want to debug with an xterm, but don't actually want to debug with the xterm executable because it doesn't have some of the abilities they need (such as displaying non-ASCII characters). You can specify the executable used to show the debugger on UNIX by setting the " XTERM_PROGRAM" runtime configuration variable.

Its default value is "xterm", but it can be set to any compatible program such as dtterm or kterm. The runtime executes this program when it tries to create the program for background debugging. Note that the runtime passes some arguments to this program, so this program must be able to execute with those arguments. These arguments are:

-title "title of the window"

-Sccn

-display Xserver-name

The "-Sccn" option allows the program to be used as the input and output channel for the runtime, and is absolutely required. Without this option, the program won't know to display data from the runtime.