It's possible this bug was present in previous versions of Xcode, but we got aware of it in Xcode 15, because it started crashing with our Xcode Kotlin plugin.
It's a result of Xcode validating the plugin cache,
but finding it invalid.
Because the plugin cache doesn't contain an entry for IDEPerformanceDebugger.framework
,
Xcode needs to rebuild the plugin graph.
Once the plugin graph is rebuilt, Xcode goes to save it.
However since IDEPerformanceDebugger
is disabled by default,
Xcode doesn't include an entry for it in the plugin cache.
As you can see, this leads to Xcode never using the plugin cache,
because it's always invalid.
The workaround we found is:
- In Terminal, run
defaults write com.apple.dt.xcode IDEPerformanceDebuggerEnabled -bool true && killall -u $USER cfprefsd
- This enables the
IDEPerformanceDebugger.framework
plugin.
- Open Xcode 15
- Since the plugin is enabled, Xcode includes it in the new plugin cache it saves
- In Terminal, run
defaults delete com.apple.dt.xcode IDEPerformanceDebuggerEnabled && killall -u $USER cfprefsd
- We don't want to keep the plugin enabled, so we disable it again.
Because it's a cache, it's possible that it will get deleted at some point and you'd have to repeat the process. Hopefully it'll get fixed by the Xcode team soon.