I'm trying to set this for my debug target but the setting won't take - bad accesses don't log to the console and getenv("NSZombieEnabled") returns NULL. Here's a screen grab of my build settings:
The problem is that you are setting it in the wrong place. It's not a compile time setting, it's a runtime setting. Here are the instructions from the iPhone Development Guide:
Quote:
To activate the NSZombieEnabled facility in your application:
Choose Project > Edit Active Executable to open the executable Info window.
Click Arguments.
Click the add (+) button in the “Variables to be set in the environment” section.
Enter NSZombieEnabled in the Name column and YES in the Value column.
Make sure that the checkmark for the NSZombieEnabled entry is selected.
The problem is that you are setting it in the wrong place. It's not a compile time setting, it's a runtime setting. Here are the instructions from the iPhone Development Guide: