I kind-of agree with Eloy here, I almost never use a debugger when doing Ruby development (vs when I do C), maybe because the language has more higher-level abstractions. The only debugging tool that I use is dtrace.

I agree nevertheless that we need a debugger. Ideally we should modify the compiler to emit debugging traps that can be used by a regular debugger, then we can write an UI for it. But as I wrote earlier this isn't something very high on the roadmap for now, because there are more high priority things to do. If someone is willing to give this a try, he's very welcome, though.

In the meantime you can still more-or-less debug MacRuby code with gdb but you need to know about the VM primitives. If you're conformable with C this should not be a problem.

Laurent

On Jun 18, 2009, at 12:33 AM, Eloy Duran wrote:

Hi Pual,

I sometimes use GDB when I need to debug RubyCocoa/MacRuby _themselves_, as they're written in C. For Ruby code, however, I almost never need a debugger. Maybe it's because I write most code test driven so I know that the code is probably ok when I actually use it. In the cases where it didn't pan out as expected, I use print style debugging or ruby- debug (RubyCocoa). For a more elaborate explanation, please see the testing video of Manfred explaining about it at the Ruby on OS X conference: http://www.fngtps.com/2009/06/ruby-on-os-x-conference-videos

We have a fairly big RubyCocoa app and some of our Rails apps are really big.

It's unfortunate that ruby-debug doesn't work on MacRuby, but Laurent has already announced that at some point in the future work will be done in this area. But at this moment, MacRuby itself still needs lots of work. So we'll need to have a bit more patience for a real debugger.

HTH,
Eloy

On Jun 18, 2009, at 4:42 AM, Paul Howson wrote:

On 04/06/2009, at 6:57 AM, Laurent Sansonetti wrote:

I have an idea about adding facilities inside the new VM in order to attach a debugger to it (and we could even patch gdb to add Ruby support!) but I won't be able to start this any time soon, because there are too many higher priority things to implement first. But if one wants to help... patches are always welcome.

Laurent

Hmmm. Lack of debugger support is surely a serious limitation. A deal-stopper for any complex real-world app I would have thought.

I guess you're aware that this will eventually be needed.

Is anyone using MacRuby for a large project? How are they coping without a debugger? (I'd like to know since I'm planning to convert an old non-Objective-C app to MacRuby).

Paul Howson
Queensland Australia
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to