Jia Li
Jia Li

Reputation: 81

How to make Xcode 8.2.1 show the line that causes an exception?

I have figured out the line of codes that caused an exception. However, when i ran it again for a couple times, it always highlighted the line where the main class was located but not the actual line which caused the exception.

Also indeed, i have tried a lots of solutions introduced by other developers, such as

go to Preferences > Behavior > Exits unexpectedly > choose show line... or click the Product tab > Scheme > Edit scheme > check the "Zombie Objects" box or simply created an exception breakpoint on the left.

Whatever i did, none of the methods above worked. So please help !!! Thanks in advance !

Upvotes: 0

Views: 255

Answers (1)

steven
steven

Reputation: 1275

Open breakpoint navigator on the left side view (seventh icon), click + button on the left down corner, select exception breakpoint, choose "All" on the "Exception" option, catch on break, and run the project in debug mode.

Upvotes: 3

Related Questions