How do I set a malloc_error_break in Xcode4? Also, I seem to be getting this error malloc: *** error for object 0x4d80814: incorrect checksum for freed object - object
This is what the breakpoints button looks like:
And this is the plus sign at the bottom left hand corner:
Man, it took me a while to find both of them!
I think this is how its done.
Usually it is caused by objects being created as subobjects of other objects that don't exist yet (ie SKPhysicsBody being created before its spritenode exists)
You can also do it directly through the gdb command window.
break malloc_error_break
or in lldb:
breakpoint set -n malloc_error_break
To open the debugger command window in XCode 4, click the middle button above "View" in the top right corner, then click the middle button in the top right corner of the bottom debugging pane that just opened. See also Input to console in Xcode 4