ruby-debug 0.5.1 has been released! The installation as usual:
$ sudo gem install ruby-debug
Below is the list of changes:
Post-mortem debugging
First of all, what the heck is post-mortem debugging? Let's say you run a script and instead of the expected result you get an exception trace. Wouldn't it be great if we can roll back to the point where this exception is raised and explore the state of your program (possibly, by moving up and down the frame stack)?
Note that it is different than setting a catch point. By setting a catch point you activate the debugger when an exception (of a specific class) is about to be raised and it doesn't matter whether it's going to be handled later in the code or not. In the post-mortem case you know that an exception's been raised and not handled as expected.
Now I'm going to demonstrate several ways of using this feature, starting from the simplest: