ios-调试程序打印详细信息 文件名 函数名 行号

来源:互联网 发布:Linux 格式化 ext4 编辑:程序博客网 时间:2024/03/29 23:04

#ifdef DEBUG

# define DebugLog(fmt, ...) NSLog((@"\n[文件名:%s]\n""[函数名:%s]\n""[行号:%d] \n" fmt), __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__);

#else

# define DebugLog(...);

#endif

说明:放在项目名-prefix.pch文件中

原创粉丝点击