Xcode doesn’t show the line that causes a crash

You should also ensure that you have breakpoints set for all exceptions. This will cause Xcode to stop at the line where the exception is occurring. Do the following [in Xcode 4]:

  1. In the Project Navigator on the left side of Xcode, click on the breakpoint navigator (almost all the way to the right hand side of the top button bar. The icon looks like a fat right arrow).

  2. At the bottom of the navigator, click the “+” button.

  3. Click “Add Exception Breakpoint”.

  4. A new breakpoint will be created. It should be configured as needed but you can tweak its behavior.

  5. Run your project and reproduce the exception.

Also you mentioned that you linked to some 3rd party libraries/frameworks. If the exception is occurring within those frameworks then you are going to have a hard time since the code is compiled and Xcode can’t actually show you the line that caused the exception. If this is the case and you are certain you are using the libraries correctly, then you should file a bug report to the maintainers of those libraries.

Leave a Comment