Debugging uncaught exception in Xcode

The easiest way to handle the exceptions in XCode during development is to add the exception break points.

You can do that as following.

  1. From left menu select Exceptions navigator

enter image description here

  1. Add the exception break point from bottom left button.

enter image description here

  1. Add break point for all the exceptions

enter image description here

  1. Run the app.

In most of the cases XCode will stop the execution on exception and point at the line that caused the exception.


In Xcode,

  1. go to Breakpoint navigator on the left pane.
  2. Click '+' at the bottom.
  3. Choose 'Add exception Breakpoint...'
  4. Let the default selections there and click 'Done'.

Rerun the app and see if execution stops at the line which causing this exception.

Tags:

Ios

Xcode