Let the Rails Backtrace Take You Right to Textmate
Whenever a Rails exception occurs, it spits out a backtrace full of filenames and line numbers. I’ve often thought, “Wouldn’t it be nice if I could just click on one of those and it would take me to the problem?” Well, it is nice—and you can use this new plugin with TextMate too, if you’d like.
The textmate_backtracer plugin (download) will make each of the backtrace lines clickable in your browser. I’ve tested this with FireFox and Safari. It’s not a debugger, but it makes life easier
To install, just download to your rails app’s ‘plugins’ folder and untar/unzip it. Then restart your server (webrick or Lighty). Enjoy!
Update: I’ve fixed a couple of things in the latest download—there was some debug info being written to STDERR (now removed), and backtrace lines without a method were not clickable (now clickable).
January 4th, 2006 at 1:22 pm
This is awesome Duane! Thanks a million!
January 4th, 2006 at 2:03 pm
Brilliant!
January 4th, 2006 at 2:59 pm
Love it. Love it!!!
It’s funny, because I got it before the “update” (quick!).
Works much better now.
January 4th, 2006 at 3:44 pm
You keep pulling them out of your magic hat. Thank!
January 4th, 2006 at 3:49 pm
This is wicked. Nice job! Thanks
January 4th, 2006 at 5:38 pm
very nice! and also works for apache.
January 5th, 2006 at 2:34 pm
I’m a Mac user, but the rest of my shop is Windows based. Is there a solution to this for Windows?
January 5th, 2006 at 2:49 pm
http://kb.mozillazine.org/Register_protocol
It’s possible to register your own protocols with FireFox (see link above); however, I’m not sure how those protocols communicate what they need to with each application. It’s possible that other text editors have already registered themselves with IE and/or FireFox. Let me know if you find a solution!
January 20th, 2006 at 9:38 am
Cool! I love intelligent errors and backtraces.
January 20th, 2006 at 2:10 pm
Great tool - thanks!
January 23rd, 2006 at 10:34 am
fantastic!
January 25th, 2006 at 2:40 pm
Nice. And it worked as advertized, on OS X, flawlessly, on the very first try.