Everyone has evil "invisible" bugs in their code from time to time. Use these tips to root out your bugs more easily.
This technote from Apple describes a number of 'secret' debugging facilities in Mac OS X, including environment variables, preferences, routines callable from GDB, special files, and so on. If you're developing for Mac OS X, you should look through this list to see if you're missing out on something that will make your life easier.
Everyone has experienced evil "invisible" bugs, such as over-releasing an object, like so:
Foundation has numerous debugging facilities that are enabled by environment variables, described here. If you're getting strange crashing and you suspect memory errors, definitely check out
NSZombieEnabled to help spot over-released objects.
Another really neat feature is debugging raw AppleEvents.