調(diào)試程序時輸出了如下日志
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.
程序沒有異常,所以全局?jǐn)帱c并沒有來。如何定位問題呢戚绕?
其實異常信息已經(jīng)非常明確Break on objc_weak_error to debug.
在objc_weak_error上打斷點,如圖:
類似的
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
就在Symbolic Breakpoint里輸入UIViewAlertForUnsatisfiableConstraints
即可調(diào)試记某。
善用此方法,可更方便調(diào)試程序构捡。