简体   繁体   English

我怎样才能回溯到xcode 4中的第一个失败

[英]How I can backtrack to the first failed in xcode 4

my apps crash to this part of code 我的应用程序崩溃到这部分代码

int main(int argc, char *argv[]) {

@autoreleasepool {
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    return retVal;
}
}

So, where in xcode 4 i can see list of things that the program did before he goes to this point, In clear I want a know at what line the program crash in my code? 那么,在xcode 4中我可以看到程序在他到达这一点之前所做的事情列表,明确我想知道程序在我的代码中崩溃的行?

If you're seeing that then it's highly likely your program has terminated due to an uncaught exception. 如果你看到了那么你的程序很可能因未被捕获的异常而终止。 Take a look at this question to see how to set a breakpoint in objc_exception_throw which will then help as you'll be dropped right into the code that's causing the exception to be thrown. 看一下这个问题 ,看看如何在objc_exception_throw设置一个断点,这将有助于你将被放入导致抛出异常的代码中。

Did you enable Zombies? 你启用了Zombies吗? To do it do the following: 为此,请执行以下操作:

1) Click on your app name(next to the Run and Stop buttons on top) 1)单击您的应用程序名称(顶部的“运行”和“停止”按钮旁边)

2) Click "Edit Scheme..." 2)点击“编辑方案...”

3) In "Memory Management" put a tick on "Enable Zombie Objects" 3)在“内存管理”中勾选“启用僵尸对象”

Or you can get there by clicking "Product" --> "Edit Scheme..." 或者你可以点击“产品” - >“编辑方案......”到达那里。

Hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM