Sometimes I'm stuck in a long loop when using binding.pry
.
I can quit the loop by exit-program
, but the command exit rails console also.
Is there easy way to exit a long loop without quitting rails console
?
I'm not sure this is what you're looking for but you may want to try the disable-pry
command which will automatically iterate though your entire loop without exiting the session. Another option (albeit not great for long loops) would be to use exit
or Ctrl+D which iterates through a single cycle of a loop. You would have to enter it repeatedly until your loop was complete, however it would allow you to hit another breakpoint if that's your goal.
For a little more control you may want to add another gem like byebug or pry-byebug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With