ios - 如何在 Xcode 中调试 EXC_BREAKPOINT (SIGTRAP)

标签 ios swift xcode debugging crash-reports

我知道这个问题可能听起来很愚蠢,但我希望了解 Xcode 中生成的崩溃报告中的问题是什么。我不知道哪个 View Controller /页面或哪个功能会崩溃。如何研究崩溃报告?请任何人帮忙..

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000ba1d8
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   myfirstapp                  0x00000001000ba1d8 0x1000b0000 + 41432
1   myfirstapp                  0x00000001000ba208 0x1000b0000 + 41480
2   UIKit                           0x0000000197b3e754 -[UIViewController _setViewAppearState:isAnimating:] + 624 (UIViewController.m:3801)
3   UIKit                           0x0000000197b3e4cc -[UIViewController __viewWillAppear:] + 156 (UIViewController.m:3911)
4   UIKit                           0x0000000197bdf760 -[UINavigationController _startTransition:fromViewController:toViewController:] + 784 (UINavigationController.m:4824)
5   UIKit                           0x0000000197bdef28 -[UINavigationController _startDeferredTransitionIfNeeded:] + 856 (UINavigationController.m:4971)
6   UIKit                           0x0000000197bdeadc -[UINavigationController __viewWillLayoutSubviews] + 64 (UINavigationController.m:5224)
7   UIKit                           0x0000000197bdea40 -[UILayoutContainerView layoutSubviews] + 188 (UILayoutContainerView.m:86)
8   UIKit                           0x0000000197b23a80 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1196 (UIView.m:14198)
9   QuartzCore                      0x0000000194fd19d8 -[CALayer layoutSublayers] + 148 (CALayer.mm:8926)
10  QuartzCore                      0x0000000194fc64cc CA::Layer::layout_if_needed(CA::Transaction*) + 292 (CALayer.mm:8806)
11  QuartzCore                      0x0000000194fc638c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32 (CALayer.mm:2345)
12  QuartzCore                      0x0000000194f433e0 CA::Context::commit_transaction(CA::Transaction*) + 252 (CAContextInternal.mm:1683)
13  QuartzCore                      0x0000000194f6aa68 CA::Transaction::commit() + 512 (CATransactionInternal.mm:419)
14  QuartzCore                      0x0000000194f6b488 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 120 (CATransactionInternal.mm:778)
15  CoreFoundation                  0x0000000191c1e0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1802)
16  CoreFoundation                  0x0000000191c1bcf0 __CFRunLoopDoObservers + 372 (CFRunLoop.c:1898)
17  CoreFoundation                  0x0000000191c1c180 __CFRunLoopRun + 1024 (CFRunLoop.c:2849)
18  CoreFoundation                  0x0000000191b4a2b8 CFRunLoopRunSpecific + 444 (CFRunLoop.c:3113)
19  GraphicsServices                0x00000001935fe198 GSEventRunModal + 180 (GSEvent.c:2245)
20  UIKit                           0x0000000197b917fc -[UIApplication _run] + 684 (UIApplication.m:2650)
21  UIKit                           0x0000000197b8c534 UIApplicationMain + 208 (UIApplication.m:4092)
22  myfirstapp                  0x00000001000b7b54 0x1000b0000 + 31572
23  libdyld.dylib                   0x0000000190b2d5b8 start + 4

最佳答案

您可以在调试器控制台中使用po命令或在Xcode断点设置部分添加异常断点。

关于ios - 如何在 Xcode 中调试 EXC_BREAKPOINT (SIGTRAP),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44362154/

相关文章:

swift - Swift 中的 super.init() 递归问题

arrays - 快速制作一个数组数组

xcode - 如何在 Xcode macosx 中安装 flutter 和 dart?

iOS 崩溃堆栈解密

iphone - 如何从JSON数据中获取数据

ios - 如何使用 NSURLSession 向服务器发送参数

ios - 如何在 iOS 7 中实现移动设备管理?

ios - 将字符串分配给另一个 View Controller 中的文本字段

ios - 在 Xcode 中为 native iOS 开发的应用程序

Swift IBDesignables 和字符间距(字距调整)