I am working on a project using the ATmega88PA, Atmel Studio 7 (version 7.0.1931), and the Atmel-ICE debugger. I'm able to program the ATmega88PA using the Atmel-ICE in ISP mode and my program runs as expected. However, when I try to debug, a curious behavior occurs: After enabling debugWire, Atmel Studio writes about 60% of the program (according to its status bar), then says "Running," and eventually I get a message saying "Launch Failed: Timed out waiting for device to reset, would you like to continue waiting for the reset event?"
The problem arose suddenly during development without hardware changes. My code is large; the hex file is 8192 bytes or 100% of flash. Could that contribute to this? What debugging steps should I take to isolate my problem?