I’m setting up Xcode Kotlin and my breakpoints are...
# touchlab-tools
j
I’m setting up Xcode Kotlin and my breakpoints aren’t working. Any tips?
Copy code
$ xcode-kotlin info                                                       

Running xcode-cli with arguments: info
Loading property list from file at /Users/jwilson/Library/Developer/Xcode/Plug-ins/Kotlin.ideplugin/Contents/Info.plist
Loading property list from file at /opt/homebrew/Cellar/xcode-kotlin/2.2.1/share/Kotlin.ideplugin/Contents/Info.plist
Installed plugin version:       2.2.1
Bundled plugin version:         2.2.1

Language spec installed: Yes
LLDB init installed: Yes
LLDB Xcode init sources main LLDB init: Yes
Loading property list from /Applications/Xcode-16.4.0.app/Contents/version.plist.
Loading property list from file at /Users/jwilson/Library/Developer/Xcode/Plug-ins/Kotlin.ideplugin/Contents/Info.plist

Installed Xcode versions:
✔       Xcode 16.4 (16F6)       null    /Applications/Xcode-16.4.0.app

✔ - plugin is compatible, x - plugin is not compatible
Run 'xcode-kotlin sync' to add compatibility for all listed Xcode versions.
Oooh I think I needed to change the selection from ‘Copy Files’ to ‘Reference files in place’
nope, that didn’t help
Hmmmm
Does it matter if I’m pointing it at a Kotlin source directory I haven’t yet built? I’m attempting to debug something we publish as a SPM module, and I just happen to have the sources handy, but the
build/
file in that project is empty
k
Does it matter if I’m pointing it at a Kotlin source directory I haven’t yet built? I’m attempting to debug something we publish as a SPM module, and I just happen to have the sources handy, but the
build/
file in that project is empty
lldb, Kotlin or not, writes absolute paths of source files as they're built. So, if you have a folder with Kotlin, but pointing at a binary SPM, it won't know that the Kotlin is what that binary is from.
👍🏻 1
We do have a specific build process that will let you debug Kotlin from SPM builds, but it involves SKIE and KMMBridge. It technically wouldn't need to, but the config needed to support that was added to those builds: https://touchlab.co/spm-kotlin-debugging
This (earlier) post explains why we have previously been recommending sharing source instead of binaries and building locally. It was primarily because of the debug path in a binary issue: https://touchlab.co/kmp-teams-use-source.
👍🏻 1