byebug, next into application code only

2019-07-20 02:27发布

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?

1条回答
干净又极端
2楼-- · 2019-07-20 02:57

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
查看更多
登录 后发表回答