Using the Execution Window
By default, input and output of your program go to the debugger console. As an alternative, DDD can also invoke an Illegal HTML tag removed : execution window, where the program terminal input and output is shown.21
To activate the execution window, select Program => Run in Execution Window
.
Using the execution window has an important side effect: The output of your program no longer gets intermixed with the output of the inferior debugger. This makes it far easier for DDD to parse the debugger output correctly. See Debugger Communication, for details on the bufferGDBOutput
resource.
The execution window is opened automatically as soon as you start the debugged program. While the execution window is active, DDD redirects the standard input, output, and error streams of your program to the execution window. Note that the device /dev/tty
still refers to the debugger console, not the execution window.
You can override the DDD stream redirection by giving alternate redirection operations as arguments. For instance, to have your program read from Illegal HTML tag removed : file, but to write to the execution window, invoke your program with <
Illegal HTML tag removed : file as argument. Likewise, to redirect the standard error output to the debugger console, use 2> /dev/tty
(assuming the inferior debugger and/or your UNIX shell support standard error redirection).
- Customizing the Execution Window:
Node:Customizing the Execution Window, Up:Using the Execution Window
Customizing the Execution Window
You can customize the DDD execution window and use a different TTY command. The command is set by Edit => Preferences => Helpers => Execution Window
:
termCommand(class TermCommand) | Resource |
---|---|
| The command to invoke for the execution window--a TTY emulator that shows the input/output of the debugged program. A Bourne shell command to run in the separate TTY is appended to this string. The string @FONT@
is replaced by the name of the fixed width font used by DDD. A simple value is
Ddd*termCommand: xterm -fn @FONT@ -e /bin/sh -c
| | --- |
You can also set the terminal type:
termType(class TermType) | Resource |
---|---|
The terminal type provided by the termCommand resource--that is, the value of the TERM environment variable to be passed to the debugged program. Default: xterm . |
---|
Whether the execution window is active or not, as set by Program => Run in Execution Window
, is saved using this resource:
separateExecWindow(class Separate) | Resource |
---|---|
If on , the debugged program is executed in a separate execution window. If off (default), the debugged program is executed in the console window. |
---|
Node:Attaching to a Process, Next:Program Stop, Previous:Using the Execution Window, Up:Running