How do I find the value of an attribute in the debugger?
1 answer
gdb doesn't know the dot syntax of properties, but it will evaluate method calls. - [UIButton enabled] returns BOOL, which is a scalar type, not an object, so you must use p
with a type like:
p (BOOL)[[self myButton] enabled]
If the property you want to check is an object, you can use po
without applying a type, for example:
po [[self myButton] font]
+3
a source to share