开发者

XCode Syntax Coloring Broken

XCode frequently seems to lose it's mind, and doesn't color code system classes or provide correct "code sense" suggestions. This is endlessly frustrating.开发者_运维百科 The question has been asked on at least three other occasions:

Problems with Xcode Syntax Highlighting

xcode code sense color/completion not working

Xcode: code loses syntax coloring

I have switched by project version to/from 3.1-compatiable and 3.2-compatiable, completely restarting XCode before and after each change with no effect.

I have rebuilt the code sense indexes and completely restarted XCode with no change.

I have built my project to make sure there are no errors and restarted.

I have copied my files (sans .svn files) to a different location - same problem.

I've already completely disabled the argument "placeholders" because they screw up my documents when i type too fast... all I'm asking for is for the "esc" key to display the correct list of properties and methods.


You should clean your project's derived data. They are likely corrupted.

Go to Organizer > Projects > Your_Project > Derived Data > Delete

Xcode will reindex your project and you should be back to normal.


For anyone interested; my app has some precompile directives:

#if ...

Turns out there was an error in one of these sections.

I'm assuming my app built fine because these sections were stripped out before they ever got to the compiler... but CodeSense doesn't care about these (it still wants to color code everything inside these) - so CodeSense would puke all over the place because of the error, even though I didn't find it when I tried to build the app.

Once I fixed the error within that block of code, my coloring returned.

Would be nice if XCode just greyed out those sections instead of dying.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜