Is my stack trace tracked?

I'm not sure what I did, how long it was like this (as I did for a while) ... but I lost the stack trace in the debugger in Xcode ... sort of. Below is a screenshot of what I see when the application crashes:

enter image description here

And on the console, I see this:

enter image description here

So, I can understand what went wrong from the console, but I skipped the stack trace, which I could click on class files and go to the source of the failure.

Could this be LLDB? Latest Xcode? Did something else swallow my exceptions? Any ideas?

+6
source share
1 answer

The problem is that the debugger does not stop when an exception occurs, it stops when the program crashes. This happens after the exception expands the stack, which means that the source no longer exists. If you want the debugger to stop before unwinding the stack, you need to set a breakpoint when an exception is thrown. Xcode makes this easy. Go to the breakpoints section in the project window.

enter image description here

Then click the + button in the lower left corner and select "Add Exception Breakpoint ...". Make sure the new breakpoint is set to trigger on a throw, or it will still occur after the stack is unwound.

enter image description here

+4
source

Source: https://habr.com/ru/post/916461/


All Articles