touchlab / xcode-kotlin

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

Xcode 15.4 debug kotlin unavailable for real devices #112

Closed ElsonPeng closed 1 month ago

ElsonPeng commented 2 months ago

Summary

I have installed the plugin with the intruction https://touchlab.co/xcodekotlin#-xcode-15-support-

Details

I can add breakpoint when the program not running. But when xcode is run, the break point turn to unavailabe. It can be shown as the screenshots

Screenshots

image

Issue Labels

TadeasKriz commented 2 months ago

Hi @ElsonPeng, could you check the following:

  1. You're compiling the code you want to debug locally. Without source mapping you can't debug a published Kotlin framework (one that's built on a different machine).
  2. You've built a debug configuration. Release configuration might not work due to optimizations and missing symbols.
  3. Try putting a breakpoint in a non-Compose file. Since Compose does a lot of compile-time modifications, I wonder if that might be the cause.

Also, you mentioned "for real devices", does that mean it works fine on an iOS simulator?

samhill303 commented 1 month ago

@ElsonPeng Please let us know if you are still having this issue and can follow up on Tadeas' questions.

ElsonPeng commented 1 month ago

@TadeasKriz @samhill303 YES, It works fine on an iOS simulator. Still have issue for real devices

TadeasKriz commented 1 month ago

@ElsonPeng Could you go through the 3 steps and let me know answers to them?

ElsonPeng commented 1 month ago

2. configuration @TadeasKriz 1、Have source mapping 2、Debug configuration 3、I cannot understand non-Compose file mean?Files not involved in compilation?

TadeasKriz commented 1 month ago
  1. From the code you posted it seemed like Jetpack Compose code so I though that could be it.

I'll retest debugging KaMPKit on a real device tomorrow. If I can't reproduce it, I'll need you to provide a minimal reproducer project.

ElsonPeng commented 1 month ago
  1. From the code you posted it seemed like Jetpack Compose code so I though that could be it.

I'll retest debugging KaMPKit on a real device tomorrow. If I can't reproduce it, I'll need you to provide a minimal reproducer project.

OK, Thanks a lot. If your email address is [me@tadeaskriz.com]?

mike-dydx commented 1 month ago

i have the same issue, following!

TadeasKriz commented 1 month ago

I tried KaMPKit on my phone and it stopped where expected.

image

Could you send a reproducer project I can try?

TadeasKriz commented 1 month ago

@mike-dydx @ElsonPeng ^^

ElsonPeng commented 1 month ago

I have resolved my problem. Thanks a lot. The reason is the compilation of product architecture.