views:

173

answers:

5

Hey there,

I currently use TextMate for Ruby/Javascript/Actionscript development and it is amazing. But one thing I would really love to use are breakpoints so I could stop code execution and examine the state of the variables and walk through the code. Something like what Flex Builder does.

Does TextMate have this capability? Or what do you use to do breakpoints and that sort of thing with Ruby? How about for Javascript too?

Thanks!

+1  A: 

There are 3 mostly-Java IDEs that run under Mac OS X yet do a good job of developing (and of course debugging) Ruby.

  • Eclipse, with the Aptana plugin;
  • IntelliJ IDEA (it knows lots of programming languages)
  • NetBeans (I think).

All three are free (even IntelliJ, they have an Open Source edition out now), so you can just download, play around with it, get accustomed and go to town.

Carl Smotricz
+2  A: 

Since TextMate is not an IDE but just a text editor (on steroids though!) I believe this is something totally not supported.

As for the javascript, this is something you can do with firebug (at least for firefox) and similar tools are included (or can be found) for IE, Chrome and Safari :)

Nikos D
+1  A: 

Eclipse with the Dynamic Languages Toolkit supports Ruby debugging. I have used it in the past, and it supports Javascript as well.

Matt
+1  A: 

TextMate is an editor and not a full-blown IDE, so it doesn't support debugging.

If you're looking for a Ruby IDE, I highly recommend RubyMine. It's got great support for debugging, running tests, easily navigating between files, and basic refactoring. Admittedly it's a lot more heavyweight, so I tend to use it for major work (or when getting up to speed on an existing code base), and still use TextMate for quick changes.

There are some open source solutions as well. In the past I've used NetBeans and RadRails, and particularly NetBeans has worked very well for me, too. Not as good as RubyMine, but well worth checking out if you're on a budget.

I should also point out that you can debug Ruby apps from the command line, using the ruby-debug gem. Basically, you place a debugger call into your code to set a breakpoint, and then run the app with rdebug instead of ruby. Check out this article for an overview.

Mirko Froehlich
thanks! always wondering how to programmatically do breakpoints :)
viatropos
A: 

arcadia is a ruby editor written in ruby with ruby debugging support. A little rough still, but at least you get the good feeling of running ruby :) -r

rogerdpack