Debugging app crashes with iOS Simulator & XCode 4 halts in main() function, not crash source [duplicate]
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Xcode 4.2 showing the wrong line of code on error Xcode 4's debugger doesn't seem to halt execution anywhere near the causes of crashes in iOS Simulator. Say I introduce a bug in my code, perhaps an array out of bounds error like this: NSMutableArray * test = [[NSMutableArray alloc] initWithCapacity:5]; [test insertObject:@"Hello" atIndex:10]; When the app inevitably crashes, I'm taken to the main function in