Я помню, как использовал компилятор (я думаю, JCreator или Eclipse), который бы сообщал вам, на какой строке кода произошел сбой.Я не могу найти эту информацию в XCode.Имеет ли он эту функцию?
РЕДАКТИРОВАТЬ:
Вот пример броска стека
2011-02-26 18:07:24.859 NumbersFlashCards[8803:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString size]: unrecognized selector sent to instance 0x531b580'
* Стек вызовов при первом броске:
(
0 CoreFoundation 0x00ebabe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0100f5c2 objc_exception_throw + 47
2 CoreFoundation 0x00ebc6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00e2c366 ___forwarding___ + 966
4 CoreFoundation 0x00e2bf22 _CF_forwarding_prep_0 + 50
5 UIKit 0x0039ab68 -[UIImageView initWithImage:] + 51
6 NumbersFlashCards 0x00003373 -[LettersFlashCardsViewController viewDidLoad] + 3311
7 UIKit 0x0037d65e -[UIViewController view] + 179
8 UIKit 0x0037f012 -[UIViewController viewControllerForRotation] + 63
9 UIKit 0x0037af76 -[UIViewController _visibleView] + 90
10 UIKit 0x00614a97 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 354
11 UIKit 0x002f6ba8 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 954
12 UIKit 0x00576948 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 1053
13 UIKit 0x00381982 -[UIViewController presentModalViewController:withTransition:] + 3151
14 NumbersFlashCards 0x00005d83 -[StartPage start] + 103
15 UIKit 0x002cfa6e -[UIApplication sendAction:to:from:forEvent:] + 119
16 UIKit 0x0035e1b5 -[UIControl sendAction:to:forEvent:] + 67
17 UIKit 0x00360647 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
18 UIKit 0x0035f438 -[UIControl touchesBegan:withEvent:] + 277
19 UIKit 0x002f4025 -[UIWindow _sendTouchesForEvent:] + 395
20 UIKit 0x002d537a -[UIApplication sendEvent:] + 447
21 UIKit 0x002da732 _UIApplicationHandleEvent + 7576
22 GraphicsServices 0x017f0a36 PurpleEventCallback + 1550
23 CoreFoundation 0x00e9c064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
24 CoreFoundation 0x00dfc6f7 __CFRunLoopDoSource1 + 215
25 CoreFoundation 0x00df9983 __CFRunLoopRun + 979
26 CoreFoundation 0x00df9240 CFRunLoopRunSpecific + 208
27 CoreFoundation 0x00df9161 CFRunLoopRunInMode + 97
28 GraphicsServices 0x017ef268 GSEventRunModal + 217
29 GraphicsServices 0x017ef32d GSEventRun + 115
30 UIKit 0x002de42e UIApplicationMain + 1160
31 NumbersFlashCards 0x00002320 main + 102
32 NumbersFlashCards 0x000022b1 start + 53
33 ??? 0x00000001 0x0 + 1
)
и я знаю, что сбой был вызван в строке 112 моего кода (я окружил его nslogs, чтобы сузить).Но я не вижу 112 здесь?Я просто не хочу каждый раз отслеживать его с помощью nslogs.