Ruby debug is stepping into rather than stepping over
Asked Answered
R

1

7

I am writing a Rails 4 application in Ruby 2, and I am using the debugger gem to debug my code.

Here is the situation currently:

I place a debugger statement in my Rspec tests, run the tests in the shell, and the program breaks as expected. Wishing to step to the next line, I enter n, but the debugger actually steps into the code, showing me the inner workings of libraries I don't care to see.

So the issue is, the debugger command n is acting like s.

How can I solve this problem*?

*I am not willing to put a breakpoint on the next line and then continue, that will get very old, very fast.

Rootless answered 30/6, 2013 at 15:54 Comment(0)
H
9

Debugger does not yet fully support Ruby 2.0, and one of the issues is that next incorrectly acts like step. You’ll have to wait till the issue is fixed for it to work correctly, or use an alternative debugger such as Byebug.

Hassle answered 30/6, 2013 at 16:1 Comment(1)
Yep, that's it. I'll just use byebug in the meantime. Thank you for the issue page link.Rootless

© 2022 - 2024 — McMap. All rights reserved.