我设置一个断点...如何在调试器控制台中获取NSDictionary对象的值/键?
如果我这样做:
(lldb) print [self dictionary]
(NSDictionary *) $5 = 0x0945c760 1 key/value pair
,但如果我这样做:
(lldb) print [[self dictionary] allKeys]
error: no known method '-allKeys'; cast the message send to the method's return type
error: 1 errors parsing expression
即使我尝试访问我所知道的是在那里的关键..
(lldb) print [[self dictionary] objectForKey:@"foobar"]
error: no known method '-objectForKey:'; cast the message send to the method's return type
error: 1 errors parsing expression
我在做什么错?
你做错了第一件事就是将这个问题标记为'xcode'。 – 2012-08-16 19:51:03
'po [self dictionary]' – Joe 2012-08-16 19:54:01