I\'m trying to put the equivalent of asm{int 3}
(or similar) into my iPhone program. My goal is to have Xcode stop exactly on the offending line, without having
Try:
__builtin_trap();
works on Mac as well as iOS, and you can drag the little green cursor to the next line to continue running.
I've tried all of these solutions and although @RichardGroves answer preserved the stack, the best solution is to:
Debug::assert(...)
This is because it's the only reliable way to both
raise(SIGTRAP)
is a relatively portable way to have an "in code" breakpoint.