4

When I press n (or type next) in a Rails app, very often I get into a gem's methods that I'm not interested in, and I have to press n lots of times just to continue execution.

Is there a way, beside filling my code with byebug calls, to just stay in my app's frames? Any tips?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
John Smith
  • 1,726
  • 2
  • 18
  • 30

1 Answers1

4

I use c n to continue to a particular line n. Byebug will run at full-speed, then stop at the line you gave it. That means that gems or not, they won't be noticed by you as they'll be processed at high-speed.

The built-in help says:

(byebug) help continue
c[ont[inue]][ nnn]

Run until program ends, hits a breakpoint or reaches line nun
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
  • 3
    The Tin Man's suggestion is a good one as a workaround, but `next` command stepping inside gem methods __is a bug__. A lot of issues have been recently fixed in `ruby-core` that could affect the `next` command in `byebug` so hopefully this won't happen again in `ruby 2.2` nor in the next patch level release of `ruby 2.1`. Have a look at the current state of this issue [here](https://github.com/deivid-rodriguez/byebug/issues/16#issuecomment-47673108). – deivid Aug 12 '14 at 09:35