Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on invoking pry debugging commands manually via method #192

Open
alexevanczuk opened this issue Oct 3, 2018 · 0 comments
Open

Comments

@alexevanczuk
Copy link

Hi --
I frequently want to do something where I have a method that when called, breaks me out of my pry and runs a number of commands. For example, if I know that the next series of calls are skippable, I might have a method:

def skip_calls
  next 5
  step 2
  next 8
  step 1
  next
end

However, this doesn't work, since the next command and others only exist when the pry console is open. I've tried using something like:

PryByebug::ContinueCommand.new(target: binding).process

But this doesn't seem to work (it needs a lot of additional context when initializing the parent pry command.

I've also tried _pry_.eval('next'), but when I call a method that references _pry_, it says _pry_ does not exist. Is there a recommended way to accomplish this?

Thanks!
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant