我已根据条件设定了一个断点……
[event.name isEqualToString:@"Some Name"]
这很好用.
但是,当我尝试使用条件添加另一个断点时…
[part.name isEqualToString:@"Some Value With A Pound Sign £"]
我收到错误……
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文字有一个错误.
(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字符串文字,因此可以解决此问题,例如:
(lldb) po [NSString stringWithUTF8String:"ü"] $11 = 0x000000010010b040 ü