在Swift破解Xcode调试/崩溃报告? [英] Is Xcode debugging/crash report in Swift broken?

查看:188
本文介绍了在Swift破解Xcode调试/崩溃报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经和Swift一起工作了一年多了,每个新的Xcode版本似乎都在变得越来越糟。



只有这样,应用程序中的崩溃报告不正确?大部分时间在 main() SIGBRT EXC_BAD_INSTRUCTION c>(是的,我在我的项目中使用main.m):







这没有帮助。如果我不添加所有异常断点,我找不到崩溃发生的地方。我刚刚从LLVM那里得到任何帮助,关于我的Swift代码上的任何错误,甚至是:





有没有我在这里丢失的东西?当我使用Objective-C进行编程时,我感觉好像更好。



更新



我发现这个解决方案:



仍在寻找如何获取异常/错误消息在Xcode中显示(再次)。

解决方案

我终于能够改进断点的调试信息。



基本上你应该创建一个所有例外断点,如下所示:





这仅适用于Xcode 7+。



信用:



http://natashatherobot.com/xcode-debugging-trick/



http://stackoverflow.com/a/31471663/447360



http://stackoverflow.com/a/4535007 / 447360


I've been working with Swift for over a year now and things seems to be only getting worse with each new Xcode release.

Is it only here that crashes in a app aren't reported correctly? Most of the time it's only SIGBRT or EXC_BAD_INSTRUCTION on main() (yes I use a main.m in my project):

That's not helpful. If I don't add an 'All Exceptions' breakpoint, I can't find where the crash happened. I just got used with not having any help at all from LLVM about any errors on my Swift code, and even then:

Is there something I'm missing here? I feel like back when I was programming with Objective-C things were much better.

UPDATE

I found this solution: http://stackoverflow.com/a/27356008/447360

Which helps sometimes:

Still looking on how to get the exception/error message to show up (again) in Xcode.

解决方案

Ok, so I finally was able to improve the debugging info for breakpoints.

Basically you should create a "All Exceptions" breakpoint like this:

This is for Xcode 7+ only.

Credit:

http://natashatherobot.com/xcode-debugging-trick/

http://stackoverflow.com/a/31471663/447360

http://stackoverflow.com/a/4535007/447360

这篇关于在Swift破解Xcode调试/崩溃报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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