Find out what line app crashes on?
Is there an easy way to find out what line an app cras开发者_Go百科hes on? The console gives little or no help to help me track down this bug and I would just like to know which line it crashes on.
Thanks!
The easiest way is to run the app under the debugger. When it crashes the debugger will show you what line of code crashed.
If you are throwing an exception rather than actually crashing, you can put a breakpoint on objc_exception_throw using the gdb console window - "br objc_exception_throw".
Are you using xcode? It should give you a visual representation of where you are in the code.
Please post the error you are receiving. The first thing to try is adding some breakpoints. For bad access errors, you can also get a more pin-point analysis from the compiler if you use NSZombie
.
精彩评论