tags:

views:

23

answers:

1

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.

A: 

Did you try frame -1? Or even better

up[ nn] move to higher frame
down[ nn] move to lower frame

Jonas Elfström
AFAIU, those commands only show you the stack variables. They do not change code execution.
Yuval A