From: Eloy D. <elo...@gm...> - 2008-01-05 11:32:17
|
Hi Rich, Running it from xcode will only work if you make a tcp connection to the debugger server from a cli client. I have no idea however why xcode would set a breakpoint marker though.... :? The best/easiest way to get this to work is the following: - Do a build debug/release whatever. - And run the build from the Terminal: $ code/MyApp/build/Debug/Contents/MacOS/MyApp - And you will get the debugger right there in the Terminal: =========================================================== $ build/Debug/DebugTest.app/Contents/MacOS/DebugTest if @assets_files.nil? (rdb:1) help ruby-debug help v0.10.0 Type 'help <command-name>' for help on a specific command Available commands: backtrace disable exit irb pp restart step up break display finish list ps save thread var catch down frame method putl set tmate where continue enable help next quit show trace delete eval info p reload source undisplay (rdb:1) irb irb(OSX::NSImage):001:0> instance_variables => ["@assets_files", "@ocid", "@inherited", "@__imported_arity", "@__mnames__"] irb(OSX::NSImage):002:0> quit /Library/Ruby/Gems/1.8/gems/rucola-0.0.3/lib/rucola/rucola_support/ core_ext/objc/nsimage.rb:7 if @assets_files.nil? (rdb:1) quit Really quit? (y/n) y =========================================================== Hope this helps. Cheers, Eloy On 5 jan 2008, at 08:53, Rich Warren wrote: > I tried ruby-debug, and set a breakpoint by adding the 'debugger' line > to my code. > > Oddly enough, XCode placed a breakpoint marker just after my > 'debugger' line. When I executed the code, it seemed to stop at the > breakpoint. Unfortunately, I couldn't do anything else--but at least > it's partially working. > > I tried to launch the code from the command line by running 'ruby > rb_main.rb' but it seems to be missing references to the Cocoa xml > files. I'll poke at it some more and let everyone know if I find > anything useful. > > -Rich- > > On Dec 30, 2007, at 1:04 AM, Eloy Duran wrote: > >> Hi, >> >> I can't speak for when/if this will be included with XCode. >> However what I use is ruby-debug (http://www.datanoise.com/ruby- >> debug/), >> it works the same with rubycocoa as it does with any other ruby code. >> >> I have some code to make it use another gui etc, >> but that's not clean enough to release atm. >> But until I do, or somebody else ;-], it should work fine in the >> terminal. >> >> Cheers, >> Eloy >> >> On 28 dec 2007, at 11:38, Tim Perrett wrote: >> >>> Hi Rich, >>> >>> Yes thats right - at the moment you cannot use breakpoints with ruby >>> code. >>> >>> Eloy or Laurent might be able to tell you if/when that might be >>> implemented. >>> >>> Cheers >>> >>> Tim >>> >>> >>> On 28 Dec 2007, at 08:50, Rich Warren wrote: >>> >>>> I'm using RubyCocoa in Leopard. It seems that XCode will not let me >>>> set breakpoints in any of the Ruby code. Is that correct? Or am I >>>> doiong something wrong? >>>> >>>> What's the best way to use this code with a debugger? >>> >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2005. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |