Skip to content

Instantly share code, notes, and snippets.

@heckj
Created December 7, 2010 05:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heckj/731495 to your computer and use it in GitHub Desktop.
Save heckj/731495 to your computer and use it in GitHub Desktop.
@schwa’s script for enabling Cocoa debugging options.
-- Script to turn on Cocoa debugging options for a the active executable of an XCode project. See <Foundation/NSDebug.h>
-- For extra points change "project document 1" to whatever the right specifier for front most project document.
on createvariable(inName, inValue)
tell application "Xcode"
set theExecutable to active executable of project document 1 of application "Xcode"
if (every environment variable of theExecutable where name is inName) is {} then
make new environment variable at end of theExecutable with properties {name:inName, value:inValue, active:true}
end if
end tell
end createvariable
createvariable("NSDebug", "YES")
createvariable("NSZombieEnabled", "YES")
createvariable("NSZombieEnabled", "YES")
createvariable("NSDeallocateZombies", "NO")
createvariable("NSHangOnUncaughtException", "NO")
createvariable("NSEnableAutoreleasePool", "YES")
createvariable("NSAutoreleaseFreedObjectCheckEnabled", "NO")
createvariable("NSAutoreleaseHighWaterMark", "0")
createvariable("NSAutoreleaseHighWaterResolution", "0")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment