How to move to the next line in binding.pry ?
28,292
Solution 1
Check out pry-nav, it gives you methods like next
and step
, which should be what you're looking for.
If you're in regular old Pry you can use exit
to go to the next binding.pry
or disable-pry
to exit Pry entirely.
Solution 2
You can't. pry doesn't have any command who let you jump to the next line. So, your alternatives are:
- Adding a new
pry.binding
on the next breakpoint and then usingexit
to jump between bingings. - Using a gem like
pry-byebug
orpry-nav
who adds thenext
command to jump to the next line. - Using a gem like
pry-byebug
orpry-debugger
who adds thebreak
command to add breakpoints likebreak <Class#method>
.
Installing pry-byebug
is the best solution for your case, you can't achieve this with just pry
.
Solution 3
you can exit
to continue the code flow
Author by
vikas95prasad
Updated on November 28, 2020Comments
-
vikas95prasad over 3 years
In byebug we can move to next line by typing 'n', similarly is there anyway to move to the next line in 'pry' ?
I have gone through there documentation but nothing's works out.