各种调试技巧
2016-10-13 本文已影响8人
下雨之後
- 断点调试并配合LLDB常用调试命令
LLDB命令详见:http://www.jianshu.com/p/d14a25731b90 - 自定义NSLog调试
//DEBUG 模式下打印日志,当前行
#ifdef DEBUG
# define MYLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define MYLog(...)
#endif
- 僵尸对象

- Xcode视图调试

- 异常断点
快速定位到错误所在位置

参考:
http://www.cnblogs.com/daiweilai/p/4421340.html#nslog
http://ios.jobbole.com/90574/