>>1
Some debuggers support logging, and with good enough logging, you can reconstruct/roll-back operations. There was at least one such experimental debugger/logger for Bochs out there. The actual memory/disk requirements tend to be pretty high unfortunately, but what would you expect?
Not entirely sure how common it would be for high-level languages, but it might be possible to keep the history a lot more compact. Purely fuctional languages (such as Haskell) might not even need a log at all as at the high-level description there is no state at all.