[MacRuby-devel] Debug Shell from GDB

Jordan K. Hubbard jkh at apple.com
Sun Nov 9 14:41:51 PST 2008


On Nov 9, 2008, at 11:57 AM, Laurent Sansonetti wrote:

> This could potentially be possible, if the objc code runs in the GC  
> environment. You could load MacRuby.framework from GDB (using  
> NSBundle), then initialize the runtime ([MacRuby sharedRuntime])  
> then start an IRB session, by evaluating the right expression (- 
> [evaluateString:]).

I think this also gets back to our previous discussion about having an  
"irb console" window always open (on its own thread) when any MacRuby  
application was run in "debugging mode" (or even compiled thusly, with  
a debugging target).  Then you'd have that console up whether you were  
in gdb or not and, frankly, would probably be happier with the  
experience when debugging ruby code (unless you're Laurent and know  
the internals of MacRuby well enough to make debugging ruby and/or C  
extension code from gdb a rewarding experience).   Ideally, one should  
be also able to set "ruby breakpoints" from such an irb console and  
see control transferred to it whenever one is hit.  It's an  
interpreted language, how hard can it be? :-)

- Jordan



More information about the MacRuby-devel mailing list