Xcode调试攻略(2)
5. Click Done.
2.2 使用场景:
程序因为SIGABRT而crash,想要定位到导致crash的行。
3. 添加符号断点(Add Symbolic BreakPoint):
3.1 断点执行的时机:Symbolic breakpoints stop program execution when a specific function or method starts executing
3.2 添加步骤:
1. Steps In the bottom-left corner of the breakpoint navigator, click the Add button.
2. Choose Add Symbolic Breakpoint.
3. Enter the symbol name in the Symbol field.
4. Click Done.
3.3 使用场景:
当想让系统在某个指定条件处中断时,设置相应的断点。
比如:
objc_exception_throw:在系统抛出异常处设置断点。
-[NSException raise]:
4. 设置NSZombieEnabled、MallocStackLogging、NSAutoreleaseFreedObjectCheckEnabled、NSDebugEnabled:
4.1 设置方法:
1. Product->Edit Scheme...->Run...->EnvironmentVariables.
2. add NSZombieEnabled,set the value with YES
3. add MallocStackLogging, set the value with YES.
4. add NSAutoreleaseFreedObjectCheckEnabled, set the value with YES.
5. add NSDebugEnabled, set the value with YES.
相关新闻>>
- 发表评论
-
- 最新评论 进入详细评论页>>
今日头条
更多>>您可能感兴趣的文章
- iPhone开发 调用阿asp.net程序的webservice
- ios 关于UITableView UITableViewCellAccessoryCheckmark 混乱的
- 深入理解iPhone静态库(手把手教你iphone开发
- (iOS-iap防护)验证用户付费收据,拒绝iap
- iphone开发基础三和c语言混编
- iPhone开发 文件的增加删除查询
- Cocoa Core Competencies 的Object creation 和IOS面试题示例
- iOS文件存磁盘的设想
- ios 时间定时器 NSTimer应用demo
- iphone-使用TextField及关闭键盘(useing TextField for in