How do you guys debug Kotlin code when running iOS app? Use Android Studio KMM Plugin or Xcode Plugin? Bodys
01/26/2021, 1:20 PM
Those are the 2 options. Personal preference.
01/26/2021, 1:23 PM
@kpgalligan Can Xcode Plugin could view the properties's value in Kotlin Object? As I described in last issue
01/26/2021, 1:34 PM
They both use the same base lldb script, but the studio plugin doesn't drill into object for some reason ( which I assume will be fixed soon). Xcode plugin does.
01/26/2021, 1:38 PM
@kpgalligan Sure, TKS
01/26/2021, 1:47 PM
debugging with KMM never worked for me. I use the Xcode plugin.
but really I strive to cover every case by unit tests so I don't have to debug via an app
01/26/2021, 1:49 PM
It's far from perfect. If you're doing a lot of lambdas, or coroutines, the debugging really doesn't work. This is all upstream in the compiler or other toolchain. I'm not an lldb expert, but the Xcode plugin and KMM plugin just set breakpoints and interact with lldb. If the binary data isn't correct/complete, the debugger can't do much.
I don't debug my code much either, unless it's like a method with a fair bit of logic. Stepping through that works well. Usually it's a Flow listening to the db, with function transforms of 1 to a handful of lines of code. In those cases, the debugger is worthless.
I take it back a bit. Just had a reason to use it and it worked pretty good 🙂