Xcode 13 indexing is broken

I had to (sigh) upgrade to Monterey last week which forced me to upgrade to Xcode 13.1

Since then, indexing seems to have died, refactoring no longer works, I can't jump to a "definitions", etc.

When I first open Xcode, I note that there's a brief message at the top saying "Initializing datastore" which lasts about 1 second and that's it.

The usual message "Indexing..." does not show up.

Anyone know how to fix this? I've had to switch to a virtual machine for development using an older OS and Xcode because of this.

Thanks in advance for any solution. Searching does not seem to find anything useful.

I normally see this every time I switch branches with this version of Xcode (13.1). If I delete the derived data folder contents sometimes it will reindex correctly other times I have to do that and then reboot the machine. It has been horribly inconsistent. I can see hundreds of errors but yet it will build and run on the phone.

This really needs to get fixed, as you state above it causes a ton of usability issues.

I hope it works better for you, not sure what is going on maybe if you aren't running one of the M variants Xcode just isn't happy any longer. Or maybe no one in Apple tests with complex large projects combining Obj-C and Swift either way it is happening not only on my machine where I work but the other iOS developer is seeing the same thing.

Note: I do not switch branches inside of Xcode maybe that would help it realize what is going on.

I've been struggling with this issue for days now. Running down all kinds of attempts... I can NOT say this was a general resolution.

I turned off Indexing in Xcode with: david@Mac ~ % defaults write com.apple.dt.XCode IDEIndexDisable 1

And later after the code fixes back on by quiting Xcode and running: david@Mac ~ % defaults write com.apple.dt.XCode IDEIndexDisable 0

This appears to have given the compiler enough CPU to complain about one of my Swift Views. It was not compiling - nor showing errors in the IDE editor. So when it finnaly got enough CPU to complain and I started fixing... One of the complaints was the SwiftUI classic: "The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions"

So that complaint was at the top of a View... so I successfully decomposed the view. And compiling started happening again.

I turned back Indexing On - it controls autocomplete and other useful IDE features you will want.

Good luck!

I have this problem with xcode 14.3. I build a very large project and after upgrading xcode (maybe 13?) started having issues with indexing. I've deleted derived data multiple times and sometimes that helps, but not completely.

I've never seen an Apple person actually address this issue that people have. I'm an xcode advocate partially because of the fast tracking of call hierarchy and definitions -- but now that is all mostly gone.

I have this problem with Xcode 14.3 as well for a large project. For my smaller project everything still works, but for my large one there is no syntax highlightling, not auto-complete, no quick jump or anything. Xcode is basically just a notepad!

It started out as problems with showing the compile errors, or they would sometimes show very briefly and then disappear right away. Now it shows the compile errors, but everything else is gone.

I have tried deleting Derived Data, switching 'Suggest completions while typing' on/off as suggested in a lot of places, switching IDEIndexDisable on/off, and I have also tried to reinstall xcode. Nothing is working!

I have this problem with Xcode 14.3.1 too. Also a very large project. I'm trying to use Xcode 15 beta to see if this problem was fixed.

Xcode 13 indexing is broken
 
 
Q