How do I get exception details in XCode 4.6?

后端 未结 3 1610
名媛妹妹
名媛妹妹 2020-12-14 04:41

I used to get exception details from apps running in the simulator like so:

po $eax

Ever since I upgraded to XCode 4.6 it\'s stopped workin

相关标签:
3条回答
  • 2020-12-14 05:07

    I don't have anything to add, just use this awesome guide that helps you setup exception breakpoint with action (script) that prints exception description in console.

    0 讨论(0)
  • 2020-12-14 05:08

    Go to :

    Product -> Scheme -> Edit Scheme -> Run on the left -> diagnostics tab 
    

    and then enable zombies

    0 讨论(0)
  • 2020-12-14 05:13

    If you break on objc_exception_throw the stack frame selected is the last frame in your code, before calling any libraries that might have thrown the exception. At that point lldb doesn't let you access some of the registers (see this answer for a possible explanation.

    To get the exception details you have to select the objc_exception_throw stack frame:

    Select the objc_exception_throw stack frame

    Now po $eax (po $rax if you are running on OS X 64 bit, po $r0 on iPhone/iPad, po $x0 on arm64) should give you the exception details.

    0 讨论(0)
提交回复
热议问题