RMagick のテストが通らないものを調べる際にどのようにデバッグしようかと思ったのですが、Debugging Ruby C Extensions in XCode - Emil Soman's blog に有益なことが書かれておりました。元の記事では Xcode 5.1 が使われていたので最新の Xcode のスクリーンショットを交えつつ手順を書いてみます。 この記事では Ruby C 拡張ライブラリの C 言語で書かれたコードをデバッグする手法を記述します。 デバッグ対象のコードを入手 $ git clone https://github.com/rmagick/rmagick.git Makefile を作成 Ruby C 拡張ライブラリの C 言語のコードは ext ディレクトリ配下にあります。RMagick では ext/RMagick となります。そこへ移動し Makefil