Xcode errors disappear
Asked Answered
A

5

36

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?

Anticipant answered 22/9, 2022 at 1:29 Comment(3)
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). ThanksBrian
It started to happen on my system after updating Xcode to version 14.3.1, but this fixes itCute
Still happening in Xcode 15.3. Lovely IDE they have here.Hupp
P
95

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 enter image description here

Pulse answered 18/4, 2023 at 14:31 Comment(7)
This solves the problem for me using Xcode 14.2Fresh
Solves 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.Ghiselin
Great! It is quite annoying. Thanks for the tip.Toothpick
The downside... You loose live issuesAlexandretta
Thank you!! Just encountered this issue on Xcode 15.0.1Uncomfortable
Thanks. It's amazing to see a bug like this in a IDE, Xcode is so bad, i regret already AppCodeIngraham
Bumped into this in Xcode 15.2.Kura
B
22

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.

Brian answered 19/1, 2023 at 18:10 Comment(5)
That worked for me in addition to toggling "Show live Issues" in Xcode settings. Don't know which one was actually effective.Smutty
Deleting the derived data worked for me - I think I'll do this every time I update Xcode.Acherman
Worked for me, and after I re-enabled 'Show Inline' and restarted Xcode, everything seemed to work as expected.Hinojosa
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.)Bushore
This worked, without touching "Show live Issues" 🤙🏻Shadrach
V
3

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
Valse answered 17/4, 2023 at 17:43 Comment(1)
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.Ghiselin
H
2

In my case it happens only when building on Rosetta simulator

Hypomania answered 18/5, 2023 at 13:43 Comment(0)
T
1

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

Tightwad answered 23/10, 2022 at 9:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.