Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you want to stop your program at the point where it crashes, you need to add an Exception breakpoint.</p> <p>Go to the Breakpoint Navigator, click on the plus button, and select Add Exception Breakpoint...</p> <p><img src="https://i.stack.imgur.com/gP4iq.png" alt="enter image description here"></p> <p>In XCode 5 it will add it straight away, but in previous versions you will need to select : All exceptions </p> <p>This will stop at where you NSArray is being accessed out of bounds, and then you can debug.</p> <p><strong><h1>Edit:</h1></strong></p> <p>After your program stops, you should be able to see in XCode the line where it crashes. If you don't see the line in XCode, you can in the debugger type:</p> <p>(lldb) bt</p> <p>'bt' will print all the steps that the program did to get there, and it will give you the information about what methods were called.</p> <p>If that doesn't give you the info you need, you can try this way:</p> <p>Your second option is to repeat the steps before, but instead of selecting Add Exception Breakpoint... you should choose Ad Symbolic Breakpoint...</p> <p>Once you select it, a pop up window will prompt to enter some values. Enter the following:</p> <p><img src="https://i.stack.imgur.com/OVyX1.png" alt="enter image description here"></p> <p>Before crashing it should stop. At that point you can navigate to the Debug Navigator to see what the steps were, and spot the location out:</p> <p><img src="https://i.stack.imgur.com/5oZiD.png" alt="enter image description here"></p> <p>As you can see setPrivateProperty is the last time a method was called before stopping.</p> <p>If the Debug Navigator doesn't give you any information, you can always go to the debugger and type:</p> <p>(lldb) bt</p> <p>As before, 'bt' will trace back all the steps to get there in more detail.</p> <p>All this info should be enough to debug your program. If you need help to interprete the 'bt' output, that's another thread!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload