开发者

Xcode 4 - Analyze issues won't show in editor

Running Analyze in Xcode 4.0.2 shows issues in the Issue Navigator. Clicking on an issue makes the appropriate file a开发者_运维知识库ppear in the Editor pane, but nowhere does it show where in the code the issue occurs as I am used to from Xcode 3.x. Does anyone know how I can turn on this feature?


A couple of tips:

First, if you're looking for the view where Xcode annotates the project with arrows, bear in mind that you may need to expand the top-level analyser result in Xcode's Issue navigator and click the second-level issue in order to see those - see screenshots.

Screenshot 1: top-level issue selected - no arrows

Xcode 4 - Analyze issues won't show in editor

Screenshot 2: second-level issue selected - arrows!

Xcode 4 - Analyze issues won't show in editor

Second tip: if that stuff isn't working, try cleaning the project's build products folder. Hold down the Option (alt) key and choose Clean Build Folder... from the Product menu. (You need to hold down the Option key, otherwise you won't see that menu option.)


I've seen this happen before sometimes. I believe it's a bug in Xcode. Restart Xcode and try again.


One note. I'm seeing this for files that are referenced outside the current project. I currently have a library in which the files with missing annotations live and simply added them to my current project without copying them. Haven't done the project dependency setup yet, so if you're referring to files outside your project that could be why. (I opened the library project, did an analyze and the annotations showed up.)


Woohoo, I've nailed it! At least for me. I've been struggling with this problem for about 2 hours now, trying out all the things suggested here and more (Xcode 4.0.2, Snow Leopard). Bizarre thing was I had one file where the warning were correctly showing in the editor. Then I noticed the difference to all other files; in the File Inspector pane the location was specified as "Relative to Project" (warnings show correctly in the editor), all the other project files were "Relative to Group" (warnings not showing in the editor).

I took one of the problem files, switched it's location to "Relative to Project", reanalyzed and bingo! I've see it's warnings in the editor.

I guess this ties in a bit with David Goodine's answer refering to files outside the project.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜