Minqi Pan
Minqi Pan

Reputation: 2801

How to let ruby/rails debugger only jump into application codes

When doing Rails development, and shen using debugger it often happens that step leads to library code, is there a way to restrict it only jumping into my application's code? Thank you very much

Upvotes: 4

Views: 162

Answers (1)

rocketscientist
rocketscientist

Reputation: 2488

Instead of using step, use next.

From the Rails guide:

The difference between next and step is that step stops at the next line of code executed, doing just a single step, while next moves to the next line without descending inside methods.

Assuming you set your breakpoint within your application code, next will not descend into library code. It will stay "in frame".

Upvotes: 2

Related Questions