Debugger : The Set File, Set Output And Cancel Output Commands : SET OUTPUT Command

SET OUTPUT Command

The SET OUTPUT command determines where the output transcript is written.

The command has three forms:

Pdb > SET OUTPUT FILE
Pdb > SET OUTPUT TERMINAL
Pdb > SET OUTPUT

In the first case, the transcript is written to the file whose name was specified in the SET FILE command. If the SET FILE command was not yet issued, then the file debug.log is used.

The second form directs the output to the terminal. This impacts trace messages only, since the transcript of user commands and corresponding Debugger responses are always displayed at the terminal.

Note: If you do not use the SET OUTPUT command, trace messages are sent to the terminal, but not to any file. Therefore, it is reasonable to use the SET OUTPUT TERMINAL command only after the commands CANCEL OUTPUT and CANCEL OUTPUT TERMINAL to renew the full display of the Debugger output on the screen.

Finally, the form SET OUTPUT without any parameters directs output to both the file and the terminal.