Environment variables are now part of the "scheme".
To edit the scheme and turn on zombies:
In the "Product" menu, select "Edit Scheme".
Go to the "Run Foo.app" stage in the left panel, and the "Arguments" tab on the right.
Add NSZombieEnabled
to the "Environment Variables" section and set the value to YES
, as you could in Xcode 3.
In Xcode 4.1 and above, there's also a checkbox on the "Diagnostics" tab of the "Run" stage to "Enable Zombie Objects".
With Xcode 6.4:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…