Emulator?

I like the analogy too.

you'll need to ditch Arduino's IDE and compile the core files manually into every project.

Actually, the IDE already includes "-g" (GDB debugging support) in each compile command. In theory, you could start up a gdb on the resulting .elf file and debug away using the gnu simulator (simulavr) ...

I have higher hopes for a sort of source-level simulator (there's at least one out there already: http://hacknmod.com/hack/100-software-based-arduino-simulator/ ), but I don't know how well they'll hold up to the sort of mix of "Arduino library" and "bare metal C manipulation" that is pretty common in Arduino Applications. (digitalWrite(pin, val) is easy to simulate. PORTB |= 1<<4 is less so...