开发者

How to know why application crashes in simulator

开发者_JAVA百科I'm running my application on the simulator but as soon as it starts it just closes I guess it crashes, however I dont get any error message or reason why it's crashing, I'm running it as debug also, is there anyplace or anyway to get an error message?


Try switching to "debugger" view, and look at the console from gdb, if it crashes you will see the error, and hopefuly the call stack.

Example of crash message: EXC_BAD_ACCESS.

If you don't have the call stack visible, you can try to type 'bt' (for back trace) at the gdb prompt.


A lot of times when my application randomly crashes before launching, there is a problem in an interface builder file (such as a connection to a now non-existant object). Check your interface builder files to see any potential bad connections or errors and if you can't find any, put an NSLog in your applicationDidFinishLaunching method to see if the application is actually being started before it crashes.


In Xcode, choose Run menu, then choose Debug — Breakpoints On. Xcode should now point you to the location in code where your app crashes in the Debugger view.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜