debug destination

Specifies a destination for debugging output. The default destination is the system console, but you can redirect output to a syslog buffer, Telnet session, or SSH session.
Syntax
debug destination [ console |logging|telnetnum| sshnum]
no debug destination [ console |logging|telnetnum| sshnum]
Parameters
console
Directs output to the system console.
logging
Directs output to the syslog buffer and to the syslog server (default).
telnetnum
Directs output to a specified Telnet session (ranges from 1 through 5).
sshnum
Directs output to a specified Secure Shell (SSH) session (ranges from 1 through 5).
Examples

To send debug output to a Telnet session, first determine your session number using the show who command.

device# show who
Console connections (by unit number):
1 established
4 minutes 29 seconds in idle
Telnet connections (inbound):
1 established, client ip address 172.31.0.1
you are connecting to this session
2 seconds in idle
2 closed
3 closed
4 closed
5 closed
Telnet connection (outbound):
6 closed
SSH connections:
1 closed
2 closed
3 closed
4 closed

This example indicates that you are connected through active Telnet session 1. To redirect the debug output to your Telnet session, enter the following command.

device# debug destination telnet 1