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.


May 11, 2011 @ 22:01:15
Is there a way to set it automatically for all projects ?
Patrick
May 12, 2011 @ 00:12:02
Since it is assigned to the build configure. I do not find a place to set it globally.
Jun 08, 2011 @ 02:53:19
Nice and clear – thanks for the post. There’s a stack overflow item explaining how to set it globally.
Jun 10, 2011 @ 14:05:01
Really? Would you mind sharing how to set it globally? Thanks a lot.
XCode 4 – Migrating the Penguins - OOgtech.org
Feb 02, 2012 @ 15:42:07
[...] scheme manager and edit environment variables for the matching target. If you can’t find it check this nice post from 42games (pics [...]