This plugin https://github.com/touchlab/xcode-kotlin doesn’t allow to debug kotlin code through Xcode, files are not colored and there is no possibility to add a breakpoint in kotlin files (though it is for .swift files), what to do?
Asked
Active
Viewed 355 times
0
-
Super confused. It looks like you asked the question then answered yourself immediately? – Kevin Galligan Oct 15 '21 at 15:01
-
StackOver provides us with an option to reply to your own questions. – Artem Ptushkin Oct 15 '21 at 15:48
-
@KevinGalligan Yes, spent some time figuring out how to make things with plugin work and decided to share knowledge here :) If you want to try this option - when ask questions just tick an option **"Answer your own question – share your knowledge, Q&A-style"** – Yulia Oct 15 '21 at 16:04
-
I know you can answer your own question, but it seemed like you did it immediately. That was the confusing part for me :) If you have an other issues, let us know (SO or github issues) – Kevin Galligan Oct 15 '21 at 16:55
1 Answers
1
- Make sure that you follow all the steps mentioned in
readme
:
- Download project from GitHub and run
./setup.sh
plugin (or./setup-xcode11.sh
for newer versions https://github.com/touchlab/xcode-kotlin/pull/30/files) - Open Xcode and go to “Show project navigator”, create a new group there (mine is under the
executive-app
) - Add
commonMain
andiosMain
folders to the newly created group
- If the steps above still don’t help, try to restart Xcode, restart the computer or delete
DerivedData
How can I delete derived data in Xcode 8? - Important! If you have several Xcode versions or if you have recently updated your Xcode, probably plugin does not know your Xcode UUID.
To make plugin know about it try:
get UUID manually:
defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
(if you have several version it will probably something likedefaults read /Applications/<howMyXCodeIsNamed>.app/Contents/Info DVTPlugInCompatibilityUUID
)write this UUID to plugin info file defaults
write ~/Library/Developer/Xcode/Plug-ins/Kotlin.ideplugin/Contents/Info DVTPlugInCompatibilityUUIDs -array-add <UUID from previous step>
Or use this https://github.com/touchlab/xcode-kotlin/pull/29/files to correct the initial script, but before please make sure that Xcode version you are now using is default (it could be set by sudo xcode-select --switch Applications/path/to/your/xcode
)

Yulia
- 99
- 5