Xcode 14 syntax highlighting not working when switching configuration

My project has multiple Xcode macOS configurations in Projucer (debug, testing, release) with each some Preprocessor Definition (for example TESTING=1)

When coding in Xcode I change the Build Configuration for my Scheme (see image) to set what I want to build.

Up until Big Sur and Xcode 12 the syntax highlighting followed that. Meaning that code between an #if TESTING block would be highlighted and autocompleting depending on the selected build configuration.

I just upgraded to Ventura and Xcode 14, and now this is broken for me. Everything in the #if TESTING block just is plain colored. Deleting the DerivedData didn’t help.

Anyone else found a solution?

I got so frustrated with these issues I just switched to CLion.

Doesn’t feel nice to go to a paid product just because Apple adds regressions to their “flagship”

My Current workaround is installing Xcode 12, and starting it directly from the binary in /Applications/Xcode.app/Contents/MacOS/Xcode (a symlink to it in Application also works)… I named it “Xcode but working”

But clearly this is not a long term solution…

1 Like