gdb is a popular, free, and open source debugger, available on (almost) all UNIX platforms.9 It offers “out of the box” support for a variety of languages (including C, C++, Objective-C, and Fortran) but not (yet) for Ruby. Nevertheless, as the standard Ruby interpreter is implemented in C, you can easily get the C-level view for any Ruby process in
gdb: inspect currents threads, visualize C-level backtraces, walk the stack, and so on. I will not describe this in much detail, because there is plenty of documentation for C debugging with
The nice thing about
gdb, though, is that you can use a couple of tricks to get a Ruby stack trace in parallel with a C-level backtrace. ...