Quick note on setting NSZombieEnabled environment variable in XCode 4

The environment variable NSZombieEnabled helps us a lot when debugging EXC_BAD_ACCESS bad access error. Many articles have discussed the usage of this setting and how we set it in old XCode 3.x.

In XCode 4, the environment variable setting is moved to the scheme. To set the NSZombieEnabled setting in XCode4, simply click the scheme list | Edit scheme.

In the Run section and Arguments tab, we find the Environment Variables like the following screenshot.

NSZombieEnabled Setting in XCode4