xcode-kotlin icon indicating copy to clipboard operation
xcode-kotlin copied to clipboard

Xcode16.2 could not add breakpoint

Open hackjie opened this issue 7 months ago • 8 comments

hello, when I update Xcode from 15.1 to 16.2, while debugging source code I can add breakpoint while not running, but after the app running the breakpoint miss

hackjie avatar May 07 '25 06:05 hackjie

Image

hackjie avatar May 07 '25 06:05 hackjie

If it was working previously, see https://touchlab.co/xcodekotlin#sync as a first step. Xcode isn't super open to extension, so this is one of the constraints. The relevant part of that doc:

Sync

When you update Xcode versions, you'll need to enable the plugin for that version. Run:

xcode-kotlin sync

This process adds the UUID for the new Xcode version to the local plugin configuration. For users familiar with earlier versions of xcode-kotlin, Xcode updates would previously require an update from GitHub.

kpgalligan avatar May 07 '25 06:05 kpgalligan

@kpgalligan thanks reply, I runned xcode-kotlin sync, and the logs below, I both have xcode15.1 and xcode16.2 on my mac

~ xcode-kotlin sync /Applications/Xcode16.2.app Running xcode-cli with arguments: sync, /Applications/Xcode16.2.app Loading property list from /Applications/Xcode16.2.app/Contents/version.plist. Loading property list from /Applications/Xcode16.2.app/Contents/version.plist. Loading property list from /Applications/Xcode.app/Contents/version.plist. Checking if any Xcode runs. Found running Xcode instance. Xcode is running. Attempt to shut down? [y/n]: y Shutting down Xcode. Shutting down Xcode... Loading property list from file at /Users/lijie/Library/Developer/Xcode/Plug-ins/Kotlin.ideplugin/Contents/Info.plist Removing Kotlin Plugin defaults so we can add it to skipped. Removing plugin from allowed/skipped list in Xcode defaults. Saving a backup of com.apple.dt.Xcode defaults to /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeRemove.plist Loading property list from /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeRemove.plist. We need Xcode to skip the plugin, so it doesn't crash. Adding plugin to skipped list in Xcode defaults. Saving a backup of com.apple.dt.Xcode defaults to /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeSkip.plist Loading property list from /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeSkip.plist. Synchronizing plugin compatibility list. Xcode installation IDs to include: EB2858C6-D4A9-4096-9AA3-BB5872AE7EF9 Loading property list from file at /Users/lijie/Library/Developer/Xcode/Plug-ins/Kotlin.ideplugin/Contents/Info.plist Previous Xcode installation IDs: 426A087B-D3AA-431A-AFDF-F135EC00DE1C, 8B9F56A7-4D8B-41AA-A65D-D4906CDF1539, 8A66E736-A720-4B3C-92F1-33D9962C69DF, 65C57D32-1E9B-44B8-8C04-A27BA7AAE2C4, DA4FDFD8-C509-4D8B-8B55-84A7B66AE701, E0A62D1F-3C18-4D74-BFE5-A4167D643966, DFFB3951-EB0A-4C09-9DAC-5F2D28CC839C, CA351AD8-3176-41CB-875C-42A05C7CDEC7, DF11C142-1584-4A99-87AC-1925D5F5652A, 89CB8A86-8683-4928-AF66-11A6CE26A829, C3998872-68CC-42C2-847C-B44D96AB2691, B395D63E-9166-4CD6-9287-6889D507AD6A, 26355AE5-C605-4A56-A79B-AD4207EA18DD, D7881182-AD00-4C36-A94D-F45FC9B0CF85, 72F7D751-F810-43B8-A53F-1F1DFD74FC54, B89EAABF-783E-4EBF-80D4-A9EAC69F77F2, 07BAA045-2DD3-489F-B232-D1D4F8B92D2D, 2FD51EF8-522D-4532-9698-980C4C497FD1, 92CB09D8-3B74-4EF7-849C-99816039F0E7, A74FBA51-FFEA-4409-B976-6FC3225A6F64, BAB79788-ACEE-4291-826B-EC4667A6BEC5, C80A9C11-3902-4885-944E-A035869BA910, 6C8909A0-F208-4C21-9224-504F9A70056E, DF12405B-55B4-4E00-8029-6AEFA7DBAD0F, 3928AC50-EA32-404F-9CAF-49710A35483C, 2F1A5FFF-BFEB-4498-B2AC-1296A7454F81, F56A1938-53DE-493D-9D64-87EE6C415E4D, 8BAA96B4-5225-471B-B124-D32A349B8106, 7A3A18B7-4C08-46F0-A96A-AB686D315DF0, 18B7-4C08-46F0-A96A-AB686D315DF0, BD431FF2-C78B-4953-A3A9-0E42593C2D32, EB2858C6-D4A9-4096-9AA3-BB5872AE7EF9 Xcode installation IDs to save: 426A087B-D3AA-431A-AFDF-F135EC00DE1C, 8B9F56A7-4D8B-41AA-A65D-D4906CDF1539, 8A66E736-A720-4B3C-92F1-33D9962C69DF, 65C57D32-1E9B-44B8-8C04-A27BA7AAE2C4, DA4FDFD8-C509-4D8B-8B55-84A7B66AE701, E0A62D1F-3C18-4D74-BFE5-A4167D643966, DFFB3951-EB0A-4C09-9DAC-5F2D28CC839C, CA351AD8-3176-41CB-875C-42A05C7CDEC7, DF11C142-1584-4A99-87AC-1925D5F5652A, 89CB8A86-8683-4928-AF66-11A6CE26A829, C3998872-68CC-42C2-847C-B44D96AB2691, B395D63E-9166-4CD6-9287-6889D507AD6A, 26355AE5-C605-4A56-A79B-AD4207EA18DD, D7881182-AD00-4C36-A94D-F45FC9B0CF85, 72F7D751-F810-43B8-A53F-1F1DFD74FC54, B89EAABF-783E-4EBF-80D4-A9EAC69F77F2, 07BAA045-2DD3-489F-B232-D1D4F8B92D2D, 2FD51EF8-522D-4532-9698-980C4C497FD1, 92CB09D8-3B74-4EF7-849C-99816039F0E7, A74FBA51-FFEA-4409-B976-6FC3225A6F64, BAB79788-ACEE-4291-826B-EC4667A6BEC5, C80A9C11-3902-4885-944E-A035869BA910, 6C8909A0-F208-4C21-9224-504F9A70056E, DF12405B-55B4-4E00-8029-6AEFA7DBAD0F, 3928AC50-EA32-404F-9CAF-49710A35483C, 2F1A5FFF-BFEB-4498-B2AC-1296A7454F81, F56A1938-53DE-493D-9D64-87EE6C415E4D, 8BAA96B4-5225-471B-B124-D32A349B8106, 7A3A18B7-4C08-46F0-A96A-AB686D315DF0, 18B7-4C08-46F0-A96A-AB686D315DF0, BD431FF2-C78B-4953-A3A9-0E42593C2D32, EB2858C6-D4A9-4096-9AA3-BB5872AE7EF9 Enabling IDEPerformanceDebugger built-in plugin. Setting IDEPerformanceDebuggerEnabled to true in Xcode defaults. Saving a backup of com.apple.dt.Xcode defaults to /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeIDEPerformanceDebuggerEnabled-true.plist Loading property list from /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeIDEPerformanceDebuggerEnabled-true.plist. Opening Xcode 15.1 (15C65) in background to generate plugin cache Opening Xcode binary in background (/Applications/Xcode.app/Contents/MacOS/Xcode). Xcode 15.1 (15C65) plugin cache file exists, checking if it contains IDEPerformanceDebugger entry yet Loading property list from /var/folders/qy/m938l6p92xxdbhrbgq4pkntr0000gn/C/com.apple.DeveloperTools/15.1-15C65/Xcode/PlugInCache-Debug.xcplugincache. Xcode 15.1 (15C65) updated the plugin cache and should work now. Killing Xcode 15.1 (15C65) Disabling IDEPerformanceDebugger built-in plugin. Setting IDEPerformanceDebuggerEnabled to false in Xcode defaults. Saving a backup of com.apple.dt.Xcode defaults to /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeIDEPerformanceDebuggerEnabled-false.plist Loading property list from /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeIDEPerformanceDebuggerEnabled-false.plist. Removing Kotlin Plugin defaults so we can add it to allowed. Removing plugin from allowed/skipped list in Xcode defaults. Saving a backup of com.apple.dt.Xcode defaults to /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeRemove.plist Loading property list from /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeRemove.plist. Allowing Kotlin Plugin Adding plugin to allowed list in Xcode defaults. Saving a backup of com.apple.dt.Xcode defaults to /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeAdd.plist Loading property list from /Users/lijie/.xcode-kotlin/backup/XcodeDefaults_BeforeAdd.plist. Synchronization complete.

hackjie avatar May 07 '25 07:05 hackjie

Have you tried following the troubleshooting steps mentioned on the site? I'm guessing it has to do with your multiple Xcode installations. I am not seeing an issue in 16.2 on my side however I only have one Xcode version installed. If you are still having issues can you run xcode-kotlin info and share the logs

KevinSchildhorn avatar May 15 '25 19:05 KevinSchildhorn

@KevinSchildhorn thanks, I tried 'xcode-kotlin info' and logs below: ➜ ~ xcode-kotlin info Running xcode-cli with arguments: info Loading property list from file at /Users/lijie/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: No Loading property list from /Applications/Xcode15.1.app/Contents/version.plist. Loading property list from /Applications/Xcode.app/Contents/version.plist. Loading property list from file at /Users/lijie/Library/Developer/Xcode/Plug-ins/Kotlin.ideplugin/Contents/Info.plist

Installed Xcode versions: ✔ Xcode 15.1 (15C65) EB2858C6-D4A9-4096-9AA3-BB5872AE7EF9 /Applications/Xcode15.1.app ✔ Xcode 16.2 (16C5032a) null /Applications/Xcode.app

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

hackjie avatar May 16 '25 09:05 hackjie

Ok, it looks like your xcode-kotlin is setup correctly. I'm just noticing your screenshot you added, there seems to be no targets on that screen which to me seems incorrect. You should be adding references to a target. That would be an issue with your project and Xcode, not with the plugin.

My other suggestion for troubleshooting is try pulling down another repository, such as KaMPKit and try following the steps with that repo. I'm aware that the docs for Xcode-Kotlin are slightly out of date but you can still follow the steps to add the kotlin code to that project.

KevinSchildhorn avatar May 16 '25 16:05 KevinSchildhorn

Image

I think the problem is that xcode-kotlin can't find the UUID for your Xcode. @KevinSchildhorn what does the xcode-kotlin info show you?

TadeasKriz avatar May 16 '25 17:05 TadeasKriz

Same for me

Running xcode-cli with arguments: info
Loading property list from file at /Users/kevinschildhorn/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: No
Loading property list from /Applications/Xcode.app/Contents/version.plist.
Loading property list from file at /Users/kevinschildhorn/Library/Developer/Xcode/Plug-ins/Kotlin.ideplugin/Contents/Info.plist

Installed Xcode versions:
✔       Xcode 16.2 (16C5032a)   null    /Applications/Xcode.app

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

KevinSchildhorn avatar May 16 '25 17:05 KevinSchildhorn

same for me

Image

SajuThomasPattarmatam avatar Jul 06 '25 05:07 SajuThomasPattarmatam

@KevinSchildhorn hello you mentioned

、、、 Ok, it looks like your xcode-kotlin is setup correctly. I'm just noticing your screenshot you added, there seems to be no targets on that screen which to me seems incorrect. You should be adding references to a target. That would be an issue with your project and Xcode, not with the plugin.

My other suggestion for troubleshooting is try pulling down another repository, such as KaMPKit and try following the steps with that repo. I'm aware that the docs for Xcode-Kotlin are slightly out of date but you can still follow the steps to add the kotlin code to that project. 、、、

I want to know what's that mean 'You should be adding references to a target. That would be an issue with your project and Xcode', could you show me the screenshot, thanks

hackjie avatar Jul 25 '25 12:07 hackjie

hello friends, after I remove 15.2, the plugin works again. Thanks all

hackjie avatar Jul 28 '25 07:07 hackjie