开发者

How to display the exact line of code causing application crash in xcode 4 debugger like in xcode 3.2

I just downloaded xcode 4 recently and have read the xcode transition guide, however, I am still wondering how do I get the same feature for debugger in xcode 4 like in xcode 3.2.

When I program in xcode 3.2 开发者_运维问答and run my application, if my code happened to cause a crash in the program, I could just press command+shift+y and I'll get the debugger mode appearing, which will shows which lines that it crashes. However, I can't seem to get this working for xcode 4.

I know that I can look at which line that actually causes the crash by looking at the stacktrace, however, having that functionality in xcode 3.2 really saves me time. Just wondering if anyone knows how to do this in xcode 4 as well.


You need to add an exception breakpoint. Select the Breakpoint Navigator, click the Add (+) button at the bottom, then choose Add Exception Breakpoint... This should cause the debugger to pause any time it encounters an exception. Note, you have to have the Breakpoints button enabled (to the right of the Scheme selector in the toolbar). Note also, in Xcode 4, Run with breakpoints enabled is synonymous with "Build and Debug" in previous versions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜