The Java debugger has a command called ‘drop to frame’ that takes you back to the beginning of the current method, resetting the stack as if you had just entered the method call. Static or instance variables won’t be reset, but it’s still pretty useful for when you stepped over a line and want to try it again. Is there the equivalent in the Ruby debugger? I suspect the answer is ‘no’, but if there’s a good reason based on how Ruby methods are implemented, I’d be curious to know why.
Share
In the Ruby 1.9 debugger, there is a jump command that is pretty close to the Java drop to frame. It won’t reset the stack like drop to frame does, but for most cases, it will let you re-test code without starting over.