Debugging iOS: How do I break on property value change? Debugging iOS: How do I break on property value change? ios ios

Debugging iOS: How do I break on property value change?


Add a symbolic breakpoint in Xcode. Use -[UIView setTransform:] as the Symbol.

Use a more narrow subclass class if you want less or more specific output.


Use a symbolic breakpoint -[UIView setTransform:]. Note that you can also use a condition with $arg1 (works only on 64bit simulator like iphone 5s) compared to some pointer to catch breakpoints on property change only for a specific instance $arg1 == 0x7f9cbba75e60. Screenshot below shows a breakpoint that catches changes on transform property only for UIView instance that has a pointer 0x7f9cbba75e60

xcode symbolic breakpoint


If you're like me, and don't write in Obj-C, here's a quick Swift way to do it for beginners.

enter image description here

Just add a didSet to the property, and a breakpoint inside the block.