I love [Ruby](http://www.ruby-lang.org/ “Ruby Programming Language”) and [TextMate](http://macromates.com/ “TextMate — The Missing Editor for Mac OS X”). So when my coworker said, “come on, ruby-debug opens in TextMate, it’s a conspiracy”, I nearly jumped for joy.
As of rails 2+, you can interactively debug **”script/server -u”**. One of the commands is **tmate**:
After you type that, it will open up TextMate with the cursor on the correct line:
Once inside TextMate, you can’t really do anything interactively. But, it does become kinda handy when stepping into rails code, you can take a look at the whole method to get a little context.
Pretty Cool!


I suppose it goes without saying that this command available and shown in “help” only when running on Darwin.
For those who use other editors, in the next release there will probably be a more general “edit” command which will work more or less like it does in gdb: the EDITOR environment variable is consulted and that editor is launched.
But in Emacs another pattern is sometimes used. (Well, at least I use it a bit). You run a shell inside emacs where you run Ruby/Rails. For this there is an Emacs output tracking mode (Rdebug-Track mode) that looks for debugger prompts or gdb-style annotations in shell output and when that’s seen it triggers another window will position that line
Going further, Anders Lindgren recently has been doing fabulous work to improve the ability to debug Ruby/Rails inside Emacs using these gdb-style annotations. However there is no reason some other front-end or programmable editor couldn’t use this as well.
You said:
“Once inside TextMate, you can’t really do anything interactively”
This article:
http://www.sitepoint.com/article/debug-rails-app-ruby-debug
mentions a textmate plugin that allows some control of ruby-debug from textmate.