我已经升级到 Xcode 5.0。当我在调试模式下运行应用程序并尝试打印NSString
控制台中的值,它给了我以下错误。有任何想法吗?
error: warning: couldn't get cmd pointer (substituting NULL): Couldn't load '_cmd' because its value couldn't be evaluated
Couldn't materialize struct: the variable 'stringValue' has no location, it may have been optimized out
Errored out in Execute, couldn't PrepareToExecuteJITExpression
这是代码:
NSString *stringValue = [[self.responseArray objectAtIndex:i] valueForKey:@"merchant_name"];
错误消息中说明了原因:它可能已被优化掉..这意味着您正在以优化的方式编译和运行代码。
你必须改变你的编译器优化级别Fastest,Smallest
to none
:
- 转到您的目标构建设置
- 搜索优化级别
- 将其更改为无(无论您处于调试、分发或发布模式)
- profit
对您的项目设置执行相同的操作
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)