美文网首页
Break on objc_weak_error to debu

Break on objc_weak_error to debu

作者: anjohnlv | 来源:发表于2017-08-30 10:02 被阅读184次

    调试程序时输出了如下日志

    objc[5104]: __weak variable at 0x17000e118 holds 0x17000b9e0 instead of 0x17025b8d0. This is probably incorrect use of objc_storeWeak() and objc_loadWeak(). Break on objc_weak_error to debug.

    程序没有异常,所以全局断点并没有来。如何定位问题呢?
    其实异常信息已经非常明确Break on objc_weak_error to debug.

    在objc_weak_error上打断点,如图:

    选择Symbolic Breakpoint
    输入objc_weak_error

    类似的

    Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.

    就在Symbolic Breakpoint里输入UIViewAlertForUnsatisfiableConstraints即可调试。

    善用此方法,可更方便调试程序。

    相关文章

      网友评论

          本文标题:Break on objc_weak_error to debu

          本文链接:https://www.haomeiwen.com/subject/lsuzdxtx.html