I am having issues with errors in Xcode. I have purposely set errors in my code just so the errors show up, but they only appear for 5 seconds then disappear. Which is making debugging extremely difficult. Is this a bug in Xcode's lates release?
-
It seems to have disappeared with XCode 14.3.1. All the answers below degraded the experience (turning of Live Issues worked around it but is a pain to use) or were transient fixes (Derived Data deletion lasted until the next rebuild only). Someone at Apple seems to have fixed the root cause (for now). Thanks – djmlewis Jun 12 '23 at 11:27
-
It started to happen on my system after updating Xcode to version 14.3.1, but [this](https://stackoverflow.com/a/75176567/259517) fixes it – Tae Jun 27 '23 at 10:45
5 Answers
Seems to be an Xcode bug, what helps me is to uncheck the Show Live Issues
option.
Xcode 14.2: Xcode > Preferences > General or ⌘, > General
Xcode 14.3.1: Xcode > Settings > General or ⌘, > General

- 8,782
- 2
- 32
- 38
-
3
-
2Solves it for me too with Xcode 14.3.1. Though the path seems to be Xcode > Settings > General instead (of "Preferences") in 14.3.1. – Louis Langholtz Jun 13 '23 at 17:16
-
From "boywhocodes" I used his suggestion which worked at once for me:
Cleaning Derived Data folder worked for me : Go to Xcode -> Settings -> Locations -> Derived Data -> Click on the right arrow icon Delete the Derived data folder and run again.

- 273
- 4
- 7
-
2That worked for me in addition to toggling "Show live Issues" in Xcode settings. Don't know which one was actually effective. – Fred Klein Apr 10 '23 at 16:06
-
Deleting the derived data worked for me - I think I'll do this every time I update Xcode. – Will Jun 10 '23 at 21:50
-
Worked for me, and after I re-enabled 'Show Inline' and restarted Xcode, everything seemed to work as expected. – Dave Hubbard Jun 24 '23 at 20:09
-
Deleting DerivedData did not fix it for me. I only had this problem in one project. What eventually have seemed to fix the issue (in 14.3.1) was to open the project again with 14.3, where the problem did not occur, and then open it again in 14.3.1. I have no idea what it changed. (At least no files that I had under git control.) – Hans Terje Bakke Aug 04 '23 at 16:04
I have tried everything and seems the only way that you can prevent Xcode error messages from disappearing is to disable indexing in your Xcode. You can disable indexing with typing following command in the terminal:
defaults write com.apple.dt.XCode IDEIndexDisable 1
and you can simply re-eanble it with this:
defaults write com.apple.dt.XCode IDEIndexDisable 0

- 31
- 4
-
I have tried disabling indexing. While that fixes another issue for me, it also seems to prevent refactoring afterwards - at least function renaming - which was a non-starter for me. – Louis Langholtz Jun 13 '23 at 17:19
As per GreyFox93's answer here:
I found that executing Xcode with Rosetta avoid that bug to occur. Maybe we loose a bit of performance but it's much more convenient to debug
In your Application folder, find Xcode, right click on it, then select "Show info". Here check the "Open with Rosetta" box. Restart Xcode if it was already opened.
Everything works great again on my side

- 1,241
- 1
- 16
- 28