Does anybody know how to enable NSZombie in Xcode 4?

Environment variables are now part of the "scheme".

If you edit the scheme you want to turn on zombies for, go to the "Run" stage in the left panel, and the "Arguments" tab on the right. You can then 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 checkbox on the "Diagnostics" tab of the "Run" stage to "Enable Zombie Objects".