Backwards debugging

I just came accross UndoDB, which allows stepping backwards through a program. It reminds me of the Objective Caml debugger.

Outside of these more complex tools, I find it easy to look back in program execution when I use recursion rather than mutation and a stack trace is available.

What other languages or language tools allow looking backwards in program execution?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

OmniCore CodeGuide

CodeGuide was a promising late entrant in the Java IDE space, before it lost out to Eclipse and IntelliJ IDEA, since it got behind the curve on automated refactorings (and still is). CodeGuide has since been rebranded as X-Develop, in an attempt to win market-share by being cross-language (Java, C#, and VB.Net). Doesn't seem to be going so well. Their one technology that hasn't been matched by anyone else in the space is their "Back-In-Time" debugger, which works by bytecode instrumentation. I'm somewhat surprised no-one has bought them out yet.

Omniscent Debugging

Omniscient Debugging is a debugger for Java that does as you describe. From what I understand, some company took this over and has turned it into a commercial product.

Haskell tracing

The Haskell tracer (Hat) has had a backward-looking style of viewing, ever since its first incarnation as "redex trails" in 1997. The idea is that every reduction step is recorded with not only a forward link from the reduceable expression (redex) to its result, but a "parent" link back from the result to the redex. Thus, it is easy to follow back from an observed "wrong" part of the whole program result (or runtime error) to the entire chain (in general, tree) of causes that led to it. This corresponds to the idea (most people will be familiar with) of a stack back-trace, except for the "tree" part. If you think about any redex, it is an application of a function to some arguments. Every argument (and the function itself) may have come about through different causes, and indeed these may all be different from where the application itself occurred. So hat-trail lets you interactively explore any of these backward-branching points.

Causeway

The Causeway debugger for E sounds like the above Hat tool, but for distributed systems.