如何在xcode 3.2调试器中显示确切的代码行,导致应用程序崩溃 [英] How to display the exact line of code causing application crash in xcode 4 debugger like in xcode 3.2

查看:162
本文介绍了如何在xcode 3.2调试器中显示确切的代码行,导致应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚下载了xcode 4,并且已经阅读了xcode转换指南,但是我仍然想知道如何在xcode4中获得与xcode 4相同的功能。



当我在xcode 3.2中编程并运行我的应用程序时,如果我的代码发生在程序中导致崩溃,我可以按命令+ shift + y,我会得到调试器模式出现,这将显示哪一行它崩溃了。但是,我似乎无法让这个工作适用于xcode 4。



我知道我可以通过查看stacktrace来查看实际导致崩溃的行,然而,在xcode 3.2中具有这个功能真的可以节省时间。只是想知道有没有人知道如何在xcode 4中这样做。

解决方案

你需要添加一个异常断点。选择断点导航器,单击底部的添加(+)按钮,然后选择添加异常断点...这将导致调试器在任何遇到异常的时候暂停。注意,您必须启用断点按钮(工具栏中方案选择器右侧)。另请注意,在Xcode 4中,启用断点运行与以前版本中的构建和调试是同义的。


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.

这篇关于如何在xcode 3.2调试器中显示确切的代码行,导致应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆