Is there a way to programmatically enable a breakpoint? Normally I'd use a breakpoint condition, but I need to use a symbolic breakpoint.
Specifically, something is changing the contentOffset
of my UIScrollView between a call to scrollToIndexPath
and a call to reloadData
. I'd like to enable the symbolic breakpoint only after the call to scrollToIndexPath
.
Jim Ingham's answer works on a x86 system. For an iOS device I was able to use the method described in this answer to programmatically create a breakpoint. Inserting the line
asm("svc 0");
Causes the debugger to stop on the following instruction in XCode.
Interestingly if you're not connected to XCode the program continues to execute normally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With