1

Say I'm debugging a function like this

def foo {
  byebug
  x = 1+1
}

Running this, we hit the breakpoint. If I now hit "n", it runs the next line and exits the function. How can I instead remain in the function and inspect x?

mahemoff
  • 44,526
  • 36
  • 160
  • 222

1 Answers1

3

Try finish 0.

The finish command should step out the number of frames you specify as an argument. If you specify 0, it has special behavior and just finishes the current frame without stepping out of it.

deivid
  • 4,808
  • 2
  • 33
  • 38