Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode not displaying compile errors

I'm working in a specific Xcode project and deliberatly making errors in my code (like using undeclared variables), but Xcode doesnt seem to show any compile errors in my code.

  • It shows errors only when its build or clean.

  • Tried clean and build, cleaning derived data and restarted both Xcode and system, none of it works.

  • Using Xcode 8.2.1 (8C1002) and Swift 3

like image 661
ajith Kumark Avatar asked May 06 '17 10:05

ajith Kumark


2 Answers

Project Settings, "Show all issues" fixed it for me.

like image 79
Paul Avatar answered Sep 26 '22 08:09

Paul


Besides the DerivedData folder, also try cleaning Xcode caches completely:

rm -rf $HOME/Library/Caches/com.apple.dt.Xcode/

I would recommend also killing the SourceKit process — always a source of issues these days! — but since you are already did a full reboot, so looks like you are good there.

If everything fails, you might consider upgrading to the latest Xcode, version 8.3. Just be aware that:

Xcode 8.3 no longer supports Swift 2.3. Please migrate your projects containing Swift 2.3 code to Swift 3 syntax by opening the project and choosing Edit > Convert > To Current Swift Syntax.

like image 33
Paulo Mattos Avatar answered Sep 25 '22 08:09

Paulo Mattos