Debugging C++ code in xcode, Is there a way to view the contents of std::shared_ptr ?
if I look at the 'watch' window all I can see is __ptr = (element_type *) 0xa66945c
and writing 'po myPointer' in immediate window also print only the memory address.
I also tried the 'view Memory of "__ptr_"' and 'view Memory of "*__ptr_"' but it only lets me see
raw memory and no actual readable text
Can anyone suggest a way to view the object I have a pointer for ?
The fr
command in LLDB has a --ptr-depth
argument, which can help in these situations. For example, try typing this into the immediate pane:
fr var myPointer --ptr-depth=1
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