Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Debug macros for Objective-C
#ifdef DEBUG
// Prettier debug messages.
#define DLog(fmt, ...) NSLog((@"%s(%d): " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
// Disable debug messages in production mode.
#define DLog(...) do { } while (0)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.