In-Circuit Emulator?

Is there an ICE available for the Arduino boards? I was hoping to do some single-step debugging.

If not an ICE, does the debugger let one run the sketch in step fashion in the IDE itself - one instruction at a time?

The Arduino UNO and previous versions using the 28 pin atmega variants (except for the atmega8) can be debugged using either the AVRJtagmkII or the AVR Dragon using the "debug wire" protocol. You will need to use AVR studio running under windows to use the debugger to set breakpoints or single step. You may also have to have the "c" and "C++" sources as well as the 'elf' file produced by the compiler so that the debugger program (avr studio) has access to the symbol table to display what's happening. Otherwise you may only be able to see a 'disassembly' listing view.

The Arduino MEGA can be debugged with either of the above mentioned hw tools using the full JTAG connection, however I'm not sure the required processor pins are available on the Arduino Mega boards, certainly the 10 pin JTAG connector is NOT on the board.

In either case you will have to 'breadboard' the connections to the debugger from the Arduino. For debug wire only gnd, vcc, and reset are required. For JTAG you need the same connections plus TCK,TDO,TDI and TMS. See the pinout diagrams for the atmega2560 processor to know which pins those are.

A4-5-6-7 are the 4 JTAG connections on the Mega.

scharkalvin: The Arduino UNO and previous versions using the 28 pin atmega variants (except for the atmega8) can be debugged using either the AVRJtagmkII or the AVR Dragon using the "debug wire" protocol. You will need to use AVR studio running under windows to use the debugger to set breakpoints or single step. You may also have to have the "c" and "C++" sources as well as the 'elf' file produced by the compiler so that the debugger program (avr studio) has access to the symbol table to display what's happening. Otherwise you may only be able to see a 'disassembly' listing view.

The Arduino MEGA can be debugged with either of the above mentioned hw tools using the full JTAG connection, however I'm not sure the required processor pins are available on the Arduino Mega boards, certainly the 10 pin JTAG connector is NOT on the board.

In either case you will have to 'breadboard' the connections to the debugger from the Arduino. For debug wire only gnd, vcc, and reset are required. For JTAG you need the same connections plus TCK,TDO,TDI and TMS. See the pinout diagrams for the atmega2560 processor to know which pins those are.

This is good info. The debugging units are: AVR JTAGICE mkII - $299 USD AVR Dragon is $50 USD: For AVR and AVR32 devices with On Chip Debug (OCD) capability AVR Studio is free. The JTAG ICE is likely too expensive. The Dragon is possible. I suppose the breadboarding isn't too bad.