debug command in IOS

The debug command is used to display information about the device operations, generated or received traffic, and any error messages. The information are provided in real-time until the user disables debugging or the device is reloaded.

The debug operation takes a lot of CPU time and should not be used often in production environments. It is meant to be used as a troubleshooting tool for only a short period of time. You can choose to debug only specific events – for example, EIGRP information, received ICMP messages, etc. Consider the following example:

debug example

In the picture above you can see that we’ve enabled debugging only for the ICMP events, such as pings. In this example you can see that R1 has responded to the device with the IP address of with five ping reply packets.

To disable debugging of the ICMP events, simply re-enter the command with the no keyword in front of it:

debug disable

You can enable debugging of everything happening on your device by issuing the debug all command (do not use this command on production devices, since it can produce a lot of output and cause your device to crash!):

debug all command

To disable this command, type the undebug all command (or the un all shortcut).

Geek University 2021