因此,开发时,我在iPhone模拟器中运行应用程序时发生崩溃。说在控制台这样的事情...为什么我不能在崩溃/异常之后运行突出显示调用堆栈的Xcode调试器?
2010-08-01 19:28:04.228 FakeCreme[32888:207] adding bucket: (null)
2010-08-01 19:28:04.230 FakeCreme[32888:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSMutableArray insertObject:atIndex:]: attempt to insert nil object at 0'
*** Call stack at first throw:
(
0 CoreFoundation 0x02641919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0278f5de objc_exception_throw + 47
2 CoreFoundation 0x0263b571 -[__NSArrayM insertObject:atIndex:] + 225
3 CoreFoundation 0x026369c4 -[__NSArrayM addObject:] + 68
4 FakeCreme 0x0000b645 -[BucketsTable didReceiveEvents:withVerb:forDomain:] + 557
5 FakeCreme 0x0002e2fa -[EventManager addObject:withVerb:inDomain:] + 3206
6 FakeCreme 0x0000a7a8 -[BucketsTable viewDidLoad] + 1389
7 UIKit 0x003cac26 -[UIViewController view] + 179
8 UIKit 0x003c9050 -[UIViewController contentScrollView] + 42
9 UIKit 0x003d8df7 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
10 UIKit 0x003d74ff -[UINavigationController _layoutViewController:] + 43
11 UIKit 0x003d8789 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
12 UIKit 0x003d3329 -[UINavigationController _startDeferredTransitionIfNeeded] + 266
13 UIKit 0x004ee209 -[UILayoutContainerView layoutSubviews] + 226
14 QuartzCore 0x040e50d5 -[CALayer layoutSublayers] + 177
15 QuartzCore 0x040e4e05 CALayerLayoutIfNeeded + 220
16 QuartzCore 0x040e464c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 302
17 QuartzCore 0x040e42b0 _ZN2CA11Transaction6commitEv + 292
18 UIKit 0x0032563f -[UIApplication _reportAppLaunchFinished] + 39
19 UIKit 0x00325a68 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 545
20 UIKit 0x0032f452 -[UIApplication handleEvent:withNewEvent:] + 1958
21 UIKit 0x00328074 -[UIApplication sendEvent:] + 71
22 UIKit 0x0032cac4 _UIApplicationHandleEvent + 7495
23 GraphicsServices 0x02cbbafa PurpleEventCallback + 1578
24 CoreFoundation 0x02622dc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
25 CoreFoundation 0x02583737 __CFRunLoopDoSource1 + 215
26 CoreFoundation 0x025809c3 __CFRunLoopRun + 979
27 CoreFoundation 0x02580280 CFRunLoopRunSpecific + 208
28 CoreFoundation 0x025801a1 CFRunLoopRunInMode + 97
29 UIKit 0x00325226 -[UIApplication _run] + 625
30 UIKit 0x00330b58 UIApplicationMain + 1160
31 FakeCreme 0x000025a0 main + 102
32 FakeCreme 0x00002531 start + 53
33 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
(崩溃的细节并不重要,只是一个例证。)
现在,它曾经是这样,当我得到这样的崩溃,我可以运行Xcode调试器,并将调用跟踪方便地加载到那里,以便调试器加载调用堆栈,并且可以交互式地导航当时调用的方法。
但自安装Xcode 3.2.3和/或切换计算机后,这不起作用。我在此时加载调试器,在那里我的应用程序暂停,但它出现空白,没有调用堆栈。
我确定有一个Xcode设置我错过了某处,但没有找到任何我自己的设置快速浏览。在这一点上,我需要做些什么才能让调试器加载调用堆栈?
是的,对于这个特殊的问题,我可以很容易地用控制台解决问题,我的问题更具有普遍性,还没有看到调试器让我调试崩溃一段时间。 – Jaanus 2010-08-02 03:17:04
@Jaanus不幸的是,LLVM调试器不适用于iOS调试:http://stackoverflow.com/questions/4908805/in-xcode-4-gm-how-do-i-turn-on-lldb-all-i -see-is-gdb – ThomasW 2011-05-31 08:52:03
很抱歉 - 它曾经是早期的beta版本。 – 2011-05-31 16:58:35