开发者

How to notice which statement's line that report error in Xcode's console window?

I'm using Xcode in my development work. Sometime I debug my application and it report error via console window. Like example below:

2009-12-10 22:13:58.968 Sunrise Cam[1023:207] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)'

2009-12-10 22:13:58.971开发者_运维百科 BowMaker [1023:207] Stack: ( 35423323, 36959497, 35507259, 35507098, 1830089, 1425959, 51192, 4390579, 5707381, 5715274, 5714271, 4430810, 4371321, 4412756, 4401311, 31769264, 31768687, 31766726, 31765818, 31799352, 35209810, 35206751, 35204168, 45553549, 45553746, 4112387, 10456, 10310 )

In Visual Studio, they report which line raise the exception. How can I do this with Xcode?


Assuming you are using Xcode 3.2.x on Snow Leopard (Mac OS X 10.6.x), the menu command Run > Stop on Objective-C Exceptions should do what you want.


Yes, Robert is right, though you won't see the line number on the console log. You need to go to the call stack trace and click on the first line you recognise.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜