Reputation: 825
Is there any way to make the content for NSManagedObject
objects visible without needing to use po
or print the description for each attribute in the NSManagedObject
object in a manual way ?!
Upvotes: 0
Views: 176
Reputation: 27110
NSManagedObject is an opaque class - as you see the only ivar it has is the isa pointer. Without knowing how it works under the hood, you don't have a way to get at the actual data it holds. You are coming from Swift but the same thing is also true on the ObjC side...
The general solution to this problem in lldb would have to have an lldb data formatter for NSManagedObject. lldb provides this for other prominent opaque classes. For instance that is how you are able to see the elements of ObjC NSArray's and NSDictionary's even though there are no explicit ivars other than the isa in these classes. Same thing for many of the swift standard library classes like arrays and dictionaries - though in the case of swift classes there are some ivars, they just aren't very instructive.
lldb doesn't currently have a data formatter for NSManagedObject. It's going to be hard for anybody outside Apple to write one, since it will depend on the implementation details of the class (which change from release to release). If such a data formatter would be useful to you, please file an enhancement request at http://bugreporter.apple.com.
Upvotes: 1