Xcode 4: setting NSZombieEnabled environment variable for all projects?-Collection of common programming errors
Have a look at following uris:
Setting environment variables for user processes: http://developer.apple.com/library/mac/#qa/qa1067/_index.html
Runtime Configuration Guide#Environment Variables: http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html
Note: you need to logout/login to make it effective.