home link download back number special issue

HMDT - Link / Macintosh / ADC / Document / Cocoa / Program Design / Debugging Cocoa Application


Debugging Cocoa Application

Cocoa アプリケーションのデバッグについて書かれているよ。

目次

  1. Setting gdb Breakpoints for Cocoa Methods
  2. Determining the Retain Count for Object

Link

HTML バージョン
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/Debugging/index.html

要約

Cocoa のメソッドにブレークポイントを設定する

ブレークポイントを設定するには、Project Builder で、Breakpoints のタブをクリックして New を押すんだ。で、メソッドの完全な名前を入れてやればいい。- [NSException raise] とか + [NSObject allocWithZone:] って感じで。

コマンドラインから設定する場合には、メソッドの名前だけでいい。raise とか、allocaWithZone: って。

オブジェクトの retain count を取得する

あるオブジェクトの retain count を知りたいときは、Porject Builder の gdb コンソールから、

print (int)[theObject retainCount]

って入れればいいんだ。


Home | Link | Download | Back Number | Speciall Issue

mailto: mkino@xd5.so-net.ne.jp

HMDT