ios – 断点条件错误

前端之家收集整理的这篇文章主要介绍了ios – 断点条件错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我已根据条件设定了一个断点…… @H_404_2@[event.name isEqualToString:@"Some Name"]

这很好用.

但是,当我尝试使用条件添加另一个断点时…

@H_404_2@[part.name isEqualToString:@"Some Value With A Pound Sign £"]

我收到错误……

@H_404_2@Internal error [IRForTarget]: An Objective-C constant string's string initializer is not an array Stopped due to an error evaluating condition of breakpoint

我是否需要逃脱英镑符号或其他什么?

解决方法

表达式解析器和包含非ASCII字符的NSString文字有一个错误. @H_404_2@(lldb) po @"u" $9 = 0x00007fff7debe5e0 u (lldb) po @"ü" Internal error [IRForTarget]: An Objective-C constant string's string initializer is not an array error: warning: expression result unused error: The expression could not be prepared to run in the target

已经有一个关于此问题的http://bugreport.apple.com/报告错误报告.

正确处理非ASCII C字符串文字,因此可以解决此问题,例如:

@H_404_2@(lldb) po [NSString stringWithUTF8String:"ü"] $11 = 0x000000010010b040 ü

猜你在找的iOS相关文章