Debug wire is an interface that enables debugging AVR microcontrollers by using one wire. All new AVR microcontrollers with less than 16kByte memory have a built-in one-wire bidirectional debugging interface that allows debugging devices in real-time.
Like the JTAG interface, DebugWIRE can handle full execution and program flow control. It also supports an unlimited number of breakpoints, adjusting memory contents. The good thing is that interface doesn’t require additional pins as only the RESET pin is used for debugging purposes.
To enable the debugwire interface, the DWEN fuse has to be programmed; also, lock bits have to be un-programmed. Then RESET port pin is activated as an open-drain bi-directional I/O pin with pullup enabled. The reset pin becomes the communication gateway between the target and the emulator. When debugging, external reset circuitry should be disconnected – so no external reset source will be present during debugging.
Debug wire adapter-debugger communicates through one data register DWDR, which the debugger can only access.
Using debugwire there, it is impossible to program Fuse settings, so it has to be done via ISP as debugWire is only for debugging and not for programming like JTAG. So once debugwire is enabled, ISP becomes disabled as RESET pin purpose is changed. So it would help if you restored from dw withing debugging system to be able to program chip again. Debugwire interface can be accessed using AVRStudio and AVRJTAG MKII adapter. With AVRStudio and AVRJTAG MKII, you don’t have to bother about entering DW and exiting from debugging as it is done automatically.