Always stop in App delegate after enabling All exceptions break point

后端 未结 3 1239
攒了一身酷
攒了一身酷 2020-12-08 09:43

When i enable all exceptions breakpoint my app always stops in AppDelegate, but im able to continue the program execution, but its very annoying cause always takes me to the

3条回答
  •  隐瞒了意图╮
    2020-12-08 10:29

    Only enable Objective-C breakpoints.

    To see the actual statement that is causing the error add an exception breakpoint:

    1. From the Main Menu Debug:Breakpoints:Create Exception Breakpoint.

    2. Right-click the breakpoint and set the exception to Objective-C. This will ignore other types of exceptions such as from C++. There are parts of the APIs that use exceptions such as Core Data (Apple is Special).

    3. Add an action: "po $arg1".

    Run the app to get the breakpoint and you will be at the line that causes the exception and the error message will be in the debugger console.

    Breakpoint example:

提交回复
热议问题