Ruby Debugging

There is a ruby-debugger gem which is very handy for trouble shooting problems in a ruby script. The built in debugging is quite powerful and worth learning to use.

First off, install ruby-debug:

# If using ruby1.8
$ gem install ruby-debug

# If using ruby 1.9.1
$ gem install ruby-debug19

Next: Watch this video….

The big thing to remember is help is your friend.

Finally: A handy ~/.rdebugrc file:

# rdebugrc
set autolist   on
set autoeval   on
set autoreload on
# EOF

Ciao!

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>