• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: where is the right place to ask RubyCocoa on Xcode related question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: where is the right place to ask RubyCocoa on Xcode related question


  • Subject: Re: where is the right place to ask RubyCocoa on Xcode related question
  • From: Dmitry Markman <email@hidden>
  • Date: Wed, 24 Jun 2009 00:44:21 -0400

another tip
if your application is running and you want to set another breakpoint
then send sigint to the applcation
(kiill -SIGINT <proces_number>
and you'll see ruby debugger prompt in the debug console




On Jun 23, 2009, at 11:56 PM, Dmitry Markman wrote:

actually I found relatively easy way to work from Xcode


as I said you should add argument -rdebug

when ruby debugger available from the debug console set breakpoint

b 18

so it will stop in the rb_main.rb at line 18 AFTER rb_main_init
OSX.NSApplicationMain(0, nil)

so all files were loaded
and now you can type

b MyView:initWithFrame
b MyView:drawRect


and start (type c)

and you'll see that debugger will stop at desirable breakpoints

here is a transcript from my debug console
(don't worry about double symbols)
Xcode 2.X was using 2 SEPARATE CONSOLE:
one for debugger
and
one for application

Xcode 3.X uses 1 for both and WE HAVE COMPLETE MESS
unless there is a way to separate them somehow
anyway here is a transcript

Debug.rb
Emacs support available.

/Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/rb_main.rb:5:require 'osx/cocoa'
(rdb:1) bb 1188


Set breakpoint 1 at /Developer/Examples/Ruby/RubyCocoa/SimpleApp/ build/Development/SimpleApp.app/Contents/Resources/rb_main.rb:18
(rdb:1) cc


Breakpoint 1, toplevel at /Developer/Examples/Ruby/RubyCocoa/ SimpleApp/build/Development/SimpleApp.app/Contents/Resources/ rb_main.rb:18
/Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/rb_main.rb:18: OSX.NSApplicationMain(0, nil)
(rdb:1) bb MMyyVViieeww..iinniittWWiitthhFFrraammee


Set breakpoint 2 at MyView.initWithFrame
(rdb:1) bb  MMyyVViieeww..ddrraawwRReecctt

Set breakpoint 3 at MyView.drawRect
(rdb:1) bb  MMyyVViieeww..sseett__ccoolloot rr

Set breakpoint 4 at MyView.set_color
(rdb:1) bb

Breakpoints:
1 /Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/rb_main.rb:18
2 MyView:initWithFrame
3 MyView:drawRect
4 MyView:set_color


(rdb:1) bb  MMyyVViieeww..sseett__aallpphhaa

Set breakpoint 5 at MyView.set_alpha
(rdb:1) bb

Breakpoints:
1 /Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/rb_main.rb:18
2 MyView:initWithFrame
3 MyView:drawRect
4 MyView:set_color
5 MyView:set_alpha


(rdb:1) cc

Breakpoint 2, initWithFrame at /Developer/Examples/Ruby/RubyCocoa/ SimpleApp/build/Development/SimpleApp.app/Contents/Resources/ MyView.rb:initWithFrame
/Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/MyView.rb:16: def initWithFrame (frame)
(rdb:1) cc


Breakpoint 5, set_alpha at /Developer/Examples/Ruby/RubyCocoa/ SimpleApp/build/Development/SimpleApp.app/Contents/Resources/ MyView.rb:set_alpha
/Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/MyView.rb:33: def set_alpha (alpha)
(rdb:1) cc


Breakpoint 4, set_color at /Developer/Examples/Ruby/RubyCocoa/ SimpleApp/build/Development/SimpleApp.app/Contents/Resources/ MyView.rb:set_color
/Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/MyView.rb:28: def set_color (color)
(rdb:1) cc


Breakpoint 3, drawRect at /Developer/Examples/Ruby/RubyCocoa/ SimpleApp/build/Development/SimpleApp.app/Contents/Resources/ MyView.rb:drawRect
/Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/MyView.rb:23: def drawRect (rect)
(rdb:1) cc


Breakpoint 4, set_color at /Developer/Examples/Ruby/RubyCocoa/ SimpleApp/build/Development/SimpleApp.app/Contents/Resources/ MyView.rb:set_color
/Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/MyView.rb:28: def set_color (color)
(rdb:1) cc


Breakpoint 3, drawRect at /Developer/Examples/Ruby/RubyCocoa/ SimpleApp/build/Development/SimpleApp.app/Contents/Resources/ MyView.rb:drawRect
/Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/MyView.rb:23: def drawRect (rect)
(rdb:1) cc


Breakpoint 4, set_color at /Developer/Examples/Ruby/RubyCocoa/ SimpleApp/build/Development/SimpleApp.app/Contents/Resources/ MyView.rb:set_color
/Developer/Examples/Ruby/RubyCocoa/SimpleApp/build/Development/ SimpleApp.app/Contents/Resources/MyView.rb:28: def set_color (color)
(rdb:1)


On Jun 23, 2009, at 4:31 AM, Nava Carmon wrote:

Hi

Seems really few people have dealt with this configuration on this xcode list.
I have a rubycocoa Xcode project, which I can't debug using gdb. I followed instructions on RubyCocoa.org on how to build a bebug version of ruby and rubycoca and still it didn't help and i can't set breakpoints in ruby sources (.rb files).
Is there something in project settings that has to be changed in order to make this working?


Thanks,

Nava
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

Dmitry Markman

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

Dmitry Markman

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >where is the right place to ask RubyCocoa on Xcode related question (From: Nava Carmon <email@hidden>)
 >Re: where is the right place to ask RubyCocoa on Xcode related question (From: Dmitry Markman <email@hidden>)

  • Prev by Date: Re: Updating a Build Number
  • Next by Date: Re: Updating a Build Number
  • Previous by thread: Re: where is the right place to ask RubyCocoa on Xcode related question
  • Next by thread: Re: Linking problem - dyld: Library not loaded
  • Index(es):
    • Date
    • Thread