Real Time "Sketch" Simulation

Not much in the way of debugging. Have a search, a few threads have covered this topic.

Basically you have serial print/write statements, compile-time error trapping, using leds on spare digital pins to mark significant events, using sd/ethernet to log data.

An arduino doesn't have enough resources for exceptions, and isn't really fast enough for a debugger to provide information in a timely fashion. Simulators are no good either, as you rely on the hardware emulation being 100% accurate, only good for profiling code without actual hardware.