How to move to the next line in binding.pry ?

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.


You can't. pry doesn't have any command who let you jump to the next line. So, your alternatives are:

  1. Adding a new pry.binding on the next breakpoint and then using exit to jump between bingings.
  2. Using a gem like pry-byebug or pry-nav who adds the next command to jump to the next line.
  3. Using a gem like pry-byebug or pry-debugger who adds the break command to add breakpoints like break <Class#method>.

Installing pry-byebug is the best solution for your case, you can't achieve this with just pry.