elehack.net

Eureka! A reversible debugger!

I blogged a while ago about finding OCaml, and really liking it. Well, that like has now been intensely increased.

For some time now, I have wanted a debugger that can go backwards. A company called Undo Software has one, UndoDB, that works with GDB. But they charge a decent fee for their product.

Enter OCaml. The debugger that ships with OCaml out of the box can go backwards. I can run my program up through its error, and then start going backwards, step by step, to the point in my code that triggered the error. I can then examine my data structures, variables, etc., as they were at that point. This is very convenient. I’m not sure how it works in the face of imperative structures and features (I haven’t tried yet), but since most of my OCaml code is functional, it’s a boon.

Comments

No comments posted.

Post a Comment

You may post a comment using the form below. All fields are optional. By submitting a comment, you release it to Michael and Jennifer Ekstrand under the Creative Commons Attribution 3.0 license. See our copyright notice for details. You might also want to read our privacy statement.