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?

4

1 回答 1

3

试试finish 0

finish命令应该跳出您指定为参数的帧数。如果您指定0,它有特殊的行为,只是完成当前帧而不退出它。

于 2015-12-05T15:16:31.550 回答