How do I get exception details in XCode 4.6?

最后都变了- 提交于 2019-11-28 19:54:23
Sebastian

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:

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.

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.

Go to :

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

and then enable zombies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!