AVR Code Debugger is useful tool to help you debug code without require resource in the MCU you are debugging. It only use 1 I/O pin, and is connected to a serial port from the host PC.
Using a VT100 terminal to capture the output from the Debug tool, all of the debug information can be captured. By adding a simple command along with the debug firmware, you can send out debug statements like debugXY(x,y, “test”). The Debugger will adapt to any speed from 1Mhz to 20Mhz without configuration from the user.
For more detail: AVR Code Debugger using AVR microcontroller