The followings are the key pints when using the DebugWire feature:
1. The programmer and target need a full connection on all ISP pins. So, the AVRStodio should be able to program the chip via the connection. This because the software need to turn ON/OFF the DWEN bit when enter/exit from the DebugWire mode. Otherwise you need a parallel programmer to diable this bit.
2. A pull-up resistor is needed between RST pin and VCC pin. I used 10K resister and it works.
3. Set the chip fuse to factory default before start SIP and Debug. This will avoid any fuse bit set incorrectly. Enable the DWEN for debugging and disable it after debug.
4. Power ON/FF the target chip once if it can not start to debug from DebugWire mode after enabled the DWEN bit.
5. The Green LED should be light up during the ISP and debug.
6. Do an ISP programming test before start the debug. This will make sure the connection is correct.
7. Start a simple testing code first. Such as just a simple loop code. This will avoid any code related issue.