设置DEBUG模式

一、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


猜你喜欢

转载自blog.csdn.net/heyachaodeios/article/details/51013329