一、building setting ---> Apple LLVM 7.0 Preprocessing------->Debug 输入:DEBUG = 1
二、Product—> scheme ——> edit scheme
三、常用宏
#ifdef DEBUG
#define LMLog(...) NSLog (@"%s -> Line:%d -> %@",__func__,__LINE__,[NSString stringWithFormat:__VA_ARGS__])
#else
#define LMLog(...)
#endif