【问题标题】:lldb in xcode gives [no Objective-C description available] when trying to call the 'count' selector尝试调用“计数”选择器时,xcode 中的 lldb 给出 [没有可用的 Objective-C 描述]
【发布时间】:2013-12-04 20:55:47
【问题描述】:

希望我的问题在屏幕截图中很清楚

在左侧窗格中,我的变量 thing 在当前断点中可见。

我想在 lldb 中对这个变量调用一些选择器

但是当我这样做时

(lldb) po [thing count]

它给出了“没有可用的 Objective-C 描述”错误消息。为什么?

【问题讨论】:

    标签: objective-c xcode xcode5 lldb


    【解决方案1】:

    poexpression -O -- 的快捷方式,它打印出描述 Objective-C 对象。

    但是[thing count] 返回一个NSUInteger,它是一个标量而不是一个Objective-C 对象。

    p [thing count]
    

    p (NSUInteger) [thing count]
    

    应该可以。

    【讨论】:

    • 或者你可以po @([thing count])(包裹在NSNumber中)
    猜你喜欢
    • 2013-10-04
    • 1970-01-01
    • 2018-01-09
    • 2023-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多