It was meant to be behavior. Realm does not copy data until the properties are actually accessed. When accessing properties, Realm extracts data directly from its file. So Realm does not store data in its ivar. In addition, the Realm object will be changed to another class when it is saved. Thus, you cannot see any values ββthrough the debugger and display all the values ββafter they are completed.
So, if you want to debug the value of objects, you can use the po command in the debug console or just use the print() method.
See also https://realm.io/docs/swift/latest/#debugging
Debugging applications using the Realms Swift API must be done through the LLDB console.
Please note that although the LLDB script installed through our Xcode Plugin allows you to check the contents of your Realm variables in the Xcodes user interface, this still does not work for Swift. Instead, these variables will show invalid data. Instead, you should use the LLDBs po command to check the contents of the data stored in Realm.
And look also: https://github.com/realm/realm-cocoa/issues/2777
source share