user7609184
user7609184

Reputation:

Exception or Crash breakpoint always goes to main.m

I do not understand why the exception breakpoint always goes to main.m instead of stopping exactly at the exception in the ViewController.m file.

I have tried solutions from the following links, but nothing seems to work:

Xcode always stopping at main.m after a crash

Xcode exception breakpoint doesn't print details of the exception being thrown

My case is simple: I am trying to return a string from an NSArray, but its a NSDictionary. This is why the program crashes:

[__NSDictionaryI length]: unrecognized selector sent to instance 0x608000673a40

& error description ..

See my settings in the breakpoint navigator:

enter image description here

Even i have enabled zombie state

I want the breakpoint to stop in the ViewController.m file where the exception or crash occurs. Is there any way to do this?

Upvotes: 1

Views: 415

Answers (1)

Shehroz
Shehroz

Reputation: 171

In Xcode 8.3 after adding only "Exception Breakpoint" the breakpoint stops where the exception occursSee screenshot

Upvotes: 1

Related Questions