HPlogo HP WDB-GUI Reference Manual: HP-UX 11i v2 > Chapter 3 Debugging with WDB GUI

Using the Program Console

» 

Technical documentation

Complete book in PDF

 » Table of Contents

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.

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.

  • 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.

© 2004-2005 Hewlett-Packard Development Company, L.P.