touchlab / xcode-kotlin

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

Can set breakpoints in release build in Xcode, but debug build doesn't see Kotlin files at all #88

Closed bodritto closed 10 months ago

bodritto commented 2 years ago

Hi!

I've installed plugin from CLI, added iosMain and commonMain as it's suggested in video tutorial

I observe crashes in my release build in iOS, and for some reason I see kotlin files in stack trace, and I can set breakpoints

image

Debug build doesn't allow to set breakpoints at all.

Output of xcode-kotlin info:

`Installed plugin version: 1.2.1 Bundled plugin version: 1.2.1

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

Installed Xcode versions: ✔ Xcode 13.2.1 (13C90b) 7A3A18B7-4C08-46F0-A96A-AB686D315DF0 /Applications/Xcode.app

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

I've seen how files in filetree look like on the video (with Koltin icon), it's not like that for me:

image

I've checked KaMPKitiOS project and it's working fine.

This project is big, its main contributor has left and I need to make some support fixes for it. Also I'm not very experienced mobile developer but I have been writing some backend/web development for several years.

Thank you for any help!

feiliu123 commented 1 year ago

I have encountered the same problem, Xcode 14.2,mac M1, there is further progress on this problem, has it been solved? If possible, could you share your experience? Thanks a million

Mars1989sh commented 10 months ago

I have the same problem too, use Xcode 15.0.1 and Xcode 15.0.0 mac M1, breakpoint not work .

➜ ~ xcode-kotlin info
Installed plugin version: 1.3.0 Bundled plugin version: 1.3.0

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

Installed Xcode versions: ✔ Xcode 15.0.1 (15A507) EB1EF21B-E756-4D3D-A6EA-E9C57D8C1924 /Applications/Xcode.app

kpgalligan commented 10 months ago

So far, all of these issues are due to incorrect configuration. Debug builds can definitely be debugged, when the IDE is configured correctly.

Please open a new issue, and explain how your build is set up, and how you've added your Kotlin files to the Xcode project.