Detecting the Debugger

http://developer.apple.com/library/mac/qa/qa1361/_index.html