Hi all :slightly_smiling_face:, I’m debugging my a...
# kotlin-native
j
Hi all 🙂, I’m debugging my app in lldb, I would like to inspect variable which happens to be Map<String, String>. How would you do it? I loaded
konan_lldb.py
which helps interpretting non-basic structure and tells you little bit more then just
ObjHeader *
. But still, output of
v
command in lldb is this
Copy code
(ObjHeader *) context = [keysArray: ..., valuesArray: ..., presenceArray: ..., hashArray: ..., keysView: ..., valuesView: ..., entriesView: ..., maxProbeDistance: ..., length: ..., hashShift: ..., _size: ..., isReadOnly: ...]
I would like to be able to print keys/values and I cant find the way to do that. Do anybody know how to do that? Thank you a lot 🙂
👍 1
m
interested to know this too
At the end, you’ll see line:
Copy code
(lldb) expression -- (int32_t)Konan_DebugPrint(a_variable)
Using that worked well for me, replacing
a_variable
with the name of the kotlin variable you want printed
j
I;ve tried Konan_debugPrint but the results weren’t impressive. Are you able to get meaningful insight printing Maps?
Btw, thank you for response, you rock! 🙂