开发者

Breakpoints in Ruby IDE?

开发者 https://www.devze.com 2022-12-13 23:49 出处:网络
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

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? O开发者_开发知识库r what do you use to do breakpoints and that sort of thing with Ruby? How about for Javascript too?

Thanks!


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 :)


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.


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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消