So as not to resurrect threads, I have similar problem to and have tried suggestions from this thread https://www.avrfreaks.net/index.p...
Basically, I can get into debug mode, but after a few steps, the debugger stops stepping, and it looks like my stack got munched.
I followed suggestions from the thread, and used a shorter cable, tried using 8mhz and then 125Khs internal clock - no joy, same symptoms - I can step into main about 3 lines, but once in a function, it's like the debugger refuses to step.
I'm just a hobbyist, this Dragon is like the max I can spend - should I try getting an atmega324 chip?
Besides it not doing much debugging, just downloading, I have managed to get the Dragon to "loose" comms by changing the ISP clock a few times, in order to try different setting, and had to reboot the Dragon.
I got a Dragon specifically to debug my programs which are becoming less trivial. Does DebugWire on your Dragon work with atmega168 or 324?