如何在Xcode中调试EXC_BREAKPOINT(SIGTRAP)
问题描述:
我知道这个问题听起来很愚蠢,但我希望能够理解在Xcode中生成的这个崩溃报告中的问题。我不知道哪个视图控制器/页面或它崩溃的功能。如何研究碰撞报告?任何人都请帮助..如何在Xcode中调试EXC_BREAKPOINT(SIGTRAP)
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中断点设置部分添加例外破发点。
只需在XCode断点设置中添加异常断点即可。你可能会在代码中得到异常的地方。而且,你是否有机器代码并且能够调试?如果没有,请按照这些链接 http://*.com/questions/1460892/symbolicating-iphone-app-crash-rep –
@Gagan_iOS对不起Gagan,我是iOS开发新手。我可以知道我应该在代码中添加异常断点吗? –
请点击此链接https://*.com/questions/17802662/exception-breakpoint-in-xcode –