Hi Henry:

Actually, I haven't learned to use the debugger. I have lots of tracing 
messages "put" and when I get a hang I add a raise statement following the last 
message generated and rerun to get a traceback. Then I add lots of put messages 
to the high level method from the TB to track down the problem.

But all this only works if the bug is my own. If a hang is caused by an 
unexpected method call from a UI object then I don't know how to track it down 
other than starting a new project and incrementally adding functionality until 
it breaks.

MacRuby has been running stable for me after my code is debugged. But I'm not 
having any luck tracking down my new problem of getting an invalid graphics 
context in my drawrect methods from 
NSGraphicsContext.currentContext.graphicsPort. I get an object of class 
__NSCFType instead of CGContextRef and I read that this class usually indicates 
a memory allocation problem. This problem started when I added PDFView and the 
Quartz.framework to my app. I don't want to have to remove my PDFView from my 
app.

Bob Rice


On Aug 12, 2010, at 10:31 PM, Henry Maddocks wrote:

> 
> On 13/08/2010, at 3:31 AM, Robert Rice wrote:
> 
>> Hi MacRuby developers:
>> 
>> Using MacRuby 0.6 stable, the most time consuming problem debugging is the 
>> tendency of MacRuby to hang without generating an error when calling an 
>> undefined method name. I usually can breakpoint until I find my error but 
>> occasionally the undefined method is called from a UI element and it is hard 
>> to find the error.
> 
> Are you putting breakpoints in your Ruby? How do you do this? I'm having a 
> hell of a time debugging MacRuby.
> 
> Henry
> 
> 
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to