iTunes is one of a few Apple-provided applications that prevent you from attaching a debugger. This can be problematic if you are developing an iTunes visualizer. There’s a way to intercept the ptrace-call before it completes, simply by starting iTunes in the gdb. The only caveat is that detaching iTunes using gdb will probably hang. To make gdb exit, you will probably have to kill it. This approach has only been tested on Lion (10.7), although I suspect it will work just as well in earlier releases of Mac OS X.”]
Source: http://www.scsc.no/blog/2011/07-28-running-itunes-in-a-debugger-gdb.html