Make Byebug finish executing without exiting Pry

user4970820 picture user4970820 · Jun 3, 2015 · Viewed 8.8k times · Source

When I set a breakpoint with Byebug in Rails, I sometimes want it to finish executing, but the guide on github says to use exit which also exits Pry. Typing continue repeatedly can be annoying if the breakpoint is in a loop.

Is there anyway to stop byebug without exiting the Rails console?

Answer

Jagjot picture Jagjot · Feb 23, 2016

When running byebug under the Rails console or in Rails' server I usually quit only byebug by hitting Ctrl+D.

The catch with this approach is, if you do this in Rails' server then Byebug will not stop and debug the next time it hits a byebug statement in your code anywhere. But it works perfectly in the Rails console.