Debugging in Ruby

gem install ruby-debug

1. Add your breakpoint in your source code.

require ‘ruby-debug’


2. Now you can test in irb



3. And use standard debugging commands:

Continue to breakpoint: c

Next Line (Step Over): n

Step Into: s

Note: interact with environment – 


See also this gem:

gem install cheat

Leave a Reply

Your email address will not be published. Required fields are marked *