Hey everyone! Yesterday we released a 2.0 version ...
# multiplatform
t
Hey everyone! Yesterday we released a 2.0 version of xcode-kotlin, the Xcode plugin which brings debugging of Kotlin Multiplatform code to Xcode. It's a big improvement compared to our previous version, so make sure to update to get all the goodies. What's new: 🤯 Vastly improved debugging performance (~5x faster). 💯 Shows more information for each frame variable (see attached screenshots). 😱 Works both in Swift and Kotlin code. 🤩 Built-in support for List and Map with more coming (e.g. StateFlow, Set) I've written more details about the improvements: https://touchlab.co/xcode-kotlin-2-0
kodee happy 2
✅ 2
h
@Tadeas Kriz can you show demo in project because I try not working like (Video screen)
t
Could you share what's not working?
h
I couldn't share as this is my code company
t
There's not much I can share, did you follow the installation instructions? Is the kotlin code you've added to Xcode higlighted?
h
Yup, by the way instruction does not show how to do run debuging in xcode.
t
If the kotlin code in Xcode is highlighted, put a breakpoint in the code and hit "Run"
Considering this image from the post, you put a breakpoint on a line (in the image it's line 13) and then hit the "Play" button on the top in Xcode window
If something's not working for you, I'll need to you to share some details about it so I can try and reproduce the issue
h
@Tadeas Kriz the break point must have or beloging to package iosMain instead of composeApp
because in my case most of my code 80% from composeApp package and crash was happen in package composeApp
t
It's possible Compose compiler changes the code that the debugger can't match it. I haven't tried xcode-kotlin with Compose Multiplatform yet
h
let say I put break point as following screen, then I just need to open folder iosApp package folder in xcode then wait until it stop at that point or ?
xcode-kotlin with Compose Multiplatform Answer: No wonder I feel like it never stop. This library should be work on package composeApp (commonMain) instead of iosMain but it is not stop there.
t
Can you add the following function above the
fun Content()
, put breakpoint into it and call it from the code?
Copy code
fun xcodeKotlinBreakpointTest() {
  println("Put a breakpoint here please")
}
And let me know if the debugger doesn't stop but you see "Put a breakpoint here please" in the console, or if it stops there
I just verified it stops in
@Composable
functions too