# XCode 2.2.1 attaching to ruby process for debugging

**URL:** <https://www.ruby-forum.com/t/xcode-2-2-1-attaching-to-ruby-process-for-debugging/100692>\
**Category:** Ruby\
**Created:** [July 31, 2006, 2:36pm UTC](https://www.ruby-forum.com/t/xcode-2-2-1-attaching-to-ruby-process-for-debugging/100692 "2006-07-31T14:36:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 31, 2006, 2:36pm UTC](https://www.ruby-forum.com/t/xcode-2-2-1-attaching-to-ruby-process-for-debugging/100692/1 "2006-07-31T14:36:46Z")

</div>

Hi,

I am developing an extension for Ruby and wish to debug it using  
XCode.

I used mkmf.rb to generate the Makefile to compile the bundle.

The extension works fine, I am adding more complicated features and  
would like to use XCode to debug the more complicated bits.

I was able to start irb to exercise the extension and I was able to  
attach to the irb process from XCode.

But it does not seems to be honour the breakpoints I set in the  
source code.

As a comparison, I am able to attach to the ruby process on Windows  
using Visual Studio and when I load and run my extension, it does stop  
at the break points I set.

Is there some addition compiler/linker flag I need to set in my  
extconf.rb file for XCode to play well with irb? Given that OSX(BSD)  
and Linux have similarity, I am wondering if anyone is using an IDE to  
debug Ruby extension on Linux, e.g. Eclipse?

BTW, I am writing my extension using C++.

Cheers
