Debugging uncaught exception in Xcode

前端 未结 2 806
青春惊慌失措
青春惊慌失措 2021-02-05 16:53

I\'m trying to get better at using Xcode. I have the AllExceptions break point turned on. When my app crashes, I see this:

*** Terminating app due to uncaught          


        
相关标签:
2条回答
  • 2021-02-05 17:05

    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

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

    1. Add break point for all the exceptions

    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.

    0 讨论(0)
  • 2021-02-05 17:28

    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.

    0 讨论(0)
提交回复
热议问题