Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Step 1.</strong> Use the debugger.</p> <p>Run -> Debugger or Shift-Command-Y. When your program encounters an error like the one above, you can see where in the code it was stopped. You can see <a href="http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeDebugging/100-Debugging_in_the_Debugger/debugging_in_debugger.html" rel="nofollow noreferrer">Apple's instructions</a> on using the debugger for details, but basic stuff is pretty easy to figure out. The most important part is the thread list panel in the upper-left quadrant of the debugger. It'll allow you to move up and down through the stack to see where in your code the error occurred. Usually you'll be able to use this to determine which one of your objects was declared as immutable and not mutable.</p> <p><strong>Step 2.</strong> Use Instruments.</p> <p><a href="http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html" rel="nofollow noreferrer">Instruments</a> is powerful and will allow you to do some pretty nifty stuff. In this situation, once you find out the memory address if your accidentally-immutable object, you can use Instruments to see the history of that object and hopefully trace it back to it's origin. To use instruments to track an object, you'll want to run Instruments with Object Allocation (Run -> Run with Performance Tool -> Object Allocations). If you know the address of the fouled-up object, you can search for it in the lower-right corner of Instruments, in the search box. Open the Extended Detail view (Command-E) to see where that object has been.</p>
 

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