HP WDB GUI 5.8 Reference Manual ( February 2008 )
Debugging with WDB GUI
Using the Program Console
Chapter 3 45
See Setting Program Input/Output Redirection in the Loading a Program and Changing
Program Settings topic for more information on standard input/output redirection.
NOTE Unless the debugger is attached to an existing process, standard output and
standard error are merged in the Program Console. You cannot redirect
standard error.
Viewing program output
To open the program console
1. On the View menu, click Program Console. The Program Console is always displayed in a
separate window.
2. Or, the Program Console is automatically opened whenever output is generated by the
program being debugged.
Entering program input
If your program requires input, enter it in the Program Console just as you would in a
terminal window. If you enter program input while program execution is paused, the input
will be buffered until program execution resumes.
To enter program input
1. In the Program Console, type your input.
2. Press Enter. The input is sent to your program.
NOTE If your program requires single-character input or tries to control its pty, start
your program in a terminal window outside of the WDB GUI and then attach to
the process. This ensures that the program you are debugging and the terminal
window are connected to the same pty.
Tips
• The Program Console uses a dtterm window by default. If the TERM environment
variable is set to hpterm, an hpterm window is used; any other $TERM value results in a
dtterm window.
• If you close the Program Console and then reopen it, all of the text will be cleared.