Skip to main content

Preprocessor debugging goodies

In this post I’ll mention some useful debug logging techniques you can use with the help of preprocessor macros.


#ifdef DEBUG
#define XLog(x, ...) NSLog(@"%s " x, __FUNCTION__, ##__VA_ARGS__)
#else
#define XLog(x)
#endif

Bynomial Code

Comments