xcode8 - Xcode 断点测试
本文介绍了xcode8 - Xcode 断点测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
我在进行断点调试的时候newDemo was compiled with optimization - stepping may behave oddly; variables may not be available.
这种错误.再然后进行打印
error: Couldn't materialize: couldn't get the value of variable self: variable not available
error: errored out in DoExecute, couldn't PrepareToExecuteJITExpression
这种错误.为什么会出现这种错误?
解决方案
newDemo was compiled with optimization - stepping may behave oddly
说的是编译的时候做了优化,所以源代码和编译后的机器码没办法一一对应,断点调试使用机器码,对应不到,所以self变量找不到。
编译的时候不要选择 Release (发布)模式。
这篇关于xcode8 - Xcode 断点测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文