Diagnosing crashes and exceptions(程序崩溃及异常的诊断)

有时候程序崩溃或者出现异常,不好找到出问题的地方。只需要设置Xcode,使其能够在程序崩溃或者出现异常的地方,主动加上断点,注意,是让Xcode主动加断点,这样可以方便我们调试


 

While you can set breakpoints yourself to break on a particular line,it would be nice if the debugger would automatically set a breakpoint on any line that causes your application to crash or that causes an exception to be thrown.

To get the debugger to do this, we need to add a breakpoint for all exceptions. Select the debug navigator(Figure 1).Then, at the bottom of the navigator area,click the "+" icon(Figure 2) and select "Add Exception Breakpoint..".Then, click the "Done" button on the panel that pops up (Figure 3).

 

Figure 1:

 

Figure 2:

Figure 3:

 

 

posted @ 2013-06-08 18:00  Dadada胖纸er  阅读(168)  评论(0编辑  收藏  举报