tôi đặt một breakpoint ...Làm cách nào tôi có thể nhận được giá trị/khóa của đối tượng NSDictionary trong bảng điều khiển trình gỡ lỗi?
nếu tôi làm:
(lldb) print [self dictionary]
(NSDictionary *) $5 = 0x0945c760 1 key/value pair
nhưng nếu tôi làm:
(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
Thậm chí nếu tôi cố gắng truy cập vào chìa khóa mà tôi biết là ở đó ..
(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
Tôi đang làm gì sai?
Điều đầu tiên bạn làm là gắn thẻ câu hỏi này là 'xcode'. –
'po [self dictionary]' – Joe