Search code examples
ruby

Binding.irb how to step to the next line when debugging with IRB


when usnig Binding.irb how do i.. step to the next line when debugging with IRB?

Or do i just place loads of binding.irb lines for everytime i want to pause execution for debugging purposes?


Solution

  • You can't. IRB is a REPL, but not a debugger.

    Use a debugger instead, like byebug:

    Usage (instead of typing binding.irb):

    byebug
    

    Then to go to the next line, type:

    next