Using the WDB GUI · Using the Program Console Home and Help Icons Keyword Index Home Using Help
Line Graphic
Line Graphic

Contents

Keyword Index

Using the WDB GUI
Starting and Exiting the WDB GUI
Loading a Program and Changing Program Settings
Opening Source Files
Changing the Working Directory
Saving and Restoring Debug Sessions
Setting Source Paths
Setting Object Paths
Viewing Your Code
Browsing Functions
Setting Signal Handling
Finding Specific Text in Your Code
Using the Command View
Using the Watch View
Using Quick Watch
Using the Local Variables View
Using the Call Stack View
Using the Threads View
Using the Registers View
Examining Memory Use
{short description of image} Using the Program Console
Using Breakpoints
Advancing Through Your Program
Fixing Code from within the Debugger
Starting and Stopping the Debug Process
Setting Debugger Preferences
Customizing Colors and Fonts

Reference Information

Troubleshooting

Using Help



Bullet Overview
Bullet Viewing Program Output
Bullet Entering Program Input
Bullet Tips
Bullet See Also

Line Graphic

Overview

The Program Console displays your program's output and accepts program input if the program uses standard UNIX I/O. Program I/O is redirected if the program performs input or output using other file descriptors or if you change the WDB GUI I/O setting.

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.
Line Graphic

Viewing Program Output

To open the program console

  • On the View menu, click Program Console. The Program Console is always displayed in a separate window.
  • Or, the Program Console is automatically opened whenever output is generated by the program being debugged.
Line Graphic

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.
Line Graphic

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.
  • To redirect standard error output, start your program in a terminal window outside of the WDB GUI and then attach to the process. This gives you direct control of standard error output.
Line Graphic

See Also

Line Graphic

Return to Top