public
Last active

  • Download Gist
Debugging.h
C
1 2 3 4 5 6 7
# define ALog(format, ...) NSLog((@"%s [L%d] " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
 
# ifdef DEBUG
# define DLog(format, ...) ALog(format, ##__VA_ARGS__);
# else
# define DLog(...)
# endif

NSString *test = @"test";
DLog(test);

This code are not work.

You should use:
NSString *test = @"test";
DLog(@"test = %@", test);

First argument is format.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.