touchlab / xcode-kotlin

Kotlin Native Xcode Plugin
https://touchlab.co/xcodekotlin
Apache License 2.0
1.15k stars 47 forks source link

po doesn't work with kotlin.String object #114

Open xiaobailong24 opened 1 month ago

xiaobailong24 commented 1 month ago

Summary

xcode-kotlin info

Installed plugin version:   2.0.0
Bundled plugin version:     2.0.0

Language spec installed: Yes
LLDB init installed: Yes
LLDB Xcode init sources main LLDB init: No

Installed Xcode versions:
✔   Xcode 15.2 (15C500b)    EB2858C6-D4A9-4096-9AA3-BB5872AE7EF9    /Applications/Xcode.app

✔ - plugin is compatible, x - plugin is not compatible
Run 'xcode-kotlin sync' to add compatibility for all listed Xcode versions.

There is a variable errorMsg of type kotlin.String in KmpApiException class. When debugging breakpoints, the correct value "系统异常" can be seen in the KmpApiException summaries, but the errorMsg detailed information cannot be displayed normally (instead of displaying "4 values"), and the same problem using lldb po

Expected result

po can print the correct value for kotlin.String

Screenshots

image

Issue Labels

TadeasKriz commented 1 month ago

This is interesting. Was this happening before you updated to xcode-kotlin 2.0.0? It seems like it chooses an array handler instead of a string one.

Could you share the code/structure of the result and cause classes? I'll try to reproduce it based on that.

xiaobailong24 commented 1 month ago

@TadeasKriz Thanks for your reply.

Was this happening before you updated to xcode-kotlin 2.0.0?

Yes.

I tried to provide a minimal demo to reproduce this problem, but failed. Currently only our production project can reproduce it, but I'm sorry I can't provide it. I will try to provide a minimal demo later.