How do I use ruby-debug inside Emacs?

debugging, emacs, ruby

Solution

As erenon said, use ruby debug, which provides a library for emacs that lets you use it just as gdb.

Install rdebug by issuing this command on your terminal(the sudo is optional, depending on your system):

<sudo> gem install ruby-debug

You then need to download the ruby-debug-extra file from rubyforge, and install it in the standard way.

  sh ./configure
  make
  make test # optional, but a good idea
  sudo make install

This gives you the elisp files for the interaction with rdebug, plus documentation for ruby-debug that can be viewed from within emacs.

AJ

Problem

I know Emacs has some sort of integration with gdb (though I never used it) to jump through files as you debug a program. I'd like to do the same with Ruby programs.

Original source