Merb uses ruby-debug (“rdebug”). Odds are good you have it installed already, but if not…
> gem install ruby-debug
To launch merb with ruby-debug enabled add the ”-D” flag:
> merb -D
Hint: If you spend more than a couple minutes using rdebug, you'll want to set up a ~/.rdebugrc file that looks something like this 1):
set autolist set autoeval set autoreload set forcestep
… and anything else you may find useful
The debugger is activated automatically anytime a debugger statement is encountered in your code. For example:
def show debugger # ... the rest of your code ... end
Another way to activate the debugger is to launch merb with the ”-C” option, which instructs merb to open the debugger any time you hit Ctrl-C. Note: This feature may be broken
rdebug is a full-featured debugger but, unfortunately, good references are a bit hard to come by. This guide for v0.10.1 , is the best I've found so far.
Feel free to add any merb-specific tips and tricks here.
rdebug /usr/bin/merb -- (your merb flags and arguments)