0
votes

I want to use pry from within irb/debugger, so I can:

  • invoke step, next, continue, finish inside of pry
  • still be able to set breakpoints, etc.

What I did is the following:

$ gem install pry
$ gem install debugger
$ gem install debugger-pry

In the code I have inserted require 'debugger'; debugger

Then I start my program with ruby example, the irb promp starts and as described here it should display the pry command on help, but it does not.

ruby-debug help v1.5.0
...
(rdb:1) pry
*** Unknown command: "pry".  Try "help".

Any idea how I could check whether it is installed correctly or what am I missing?

1

1 Answers

0
votes

I think you need:

require 'debugger/pry'

you could add it to the top of your example.rb file.