Skip to content

Instantly share code, notes, and snippets.

@ksm
Created February 20, 2012 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ksm/1868785 to your computer and use it in GitHub Desktop.
Save ksm/1868785 to your computer and use it in GitHub Desktop.
Xcode: how to debug the right way
// via @_bejo
// then just add a DEBUG = 1 to debug target in xcode
#ifdef DEBUG
#define DebugLog( s, ... ) NSLog( @"<%@:(%d)> %@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define DebugLog( s, ... )
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment