Can I create a breakpoint in code in iOS, like `__asm{int 3}` on VC++, and continue execution after it's been hit?
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.
raise(SIGTRAP)
is a relatively portable way to have an "in code" breakpoint.
I've tried all of these solutions and although @RichardGroves answer preserved the stack, the best solution is to:
- create your own assert method, such as
Debug::assert(...)
- set a breakpoint within XCode on that implementation
- use the Step Out command to get back to the caller
This is because it's the only reliable way to both
- view the stack trace
- step / continue