https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
l

Lena Brusilovski

04/09/2021, 5:38 PM
does anyone know how i can debug code that is written with kotlin on ios? when i run the code i cant seem to watch any variables, i get them as ObjcHeader or ObjcObject and i cant know the contents of them. Does anyone know how to fix it? if it is fixable?
k

kpgalligan

04/10/2021, 3:48 PM
There's the KMM plugin for Android Studio, and we publish a plugin for Xcode: https://github.com/touchlab/xcode-kotlin
l

Lena Brusilovski

04/10/2021, 3:49 PM
i installed the KMM plugin for android studio
and the plugin for xcode as well
but it does not show the contents of the variables
k

kpgalligan

04/10/2021, 3:49 PM
KMM plugin doesn't (or didn't last I tried), xcode plugin should
If you're debugging Swift code that calls kotlin, that's kind of a different story. If you're debugging kotlin, it should show variables
l

Lena Brusilovski

04/10/2021, 3:50 PM
i’m debugging kotlin
i am actually debugging cinterop
does that matter in any way ?
k

kpgalligan

04/10/2021, 3:51 PM
Ah, that's different I imagine. The lldb script is written to look at kotlin objects. It won't tell you what's happening inside cinterop
I assume, anyway. Haven't tried.
l

Lena Brusilovski

04/10/2021, 3:52 PM
do you know anything about cinterop? there are methods missing in ios extensions that did not go innto the cinterop for some reason
8 Views