Xcode 4.2 符号导航器搞砸了

发布于 2024-12-24 16:17:44 字数 657 浏览 2 评论 0原文

出乎意料的是,“符号导航器”(导航器窗格中左侧的第二个图标)开始只允许我访问单个 .h 文件。 “项目导航器”继续显示整个项目。

我尝试过来回翻转、重新启动 Xcode 等,但无济于事。它卡在那个文件上。

我得到的一个线索是 .h 文件是项目的第二个目标(测试目标)中唯一的 .h 文件。但我没有看到任何方法来选择目标(相对于项目)通过符号导航器进行导航(而且我绝对没有“玩”任何可能影响此问题的设置。)

有什么想法吗?导航已经在 Xcode 4 中支持了,我不需要再被这个问题困扰。

其他信息:我注意到,当符号最明确地存在(并且通过搜索找到)时,Cmd/Click 项目中定义的符号会生成“未找到符号”。

叹息神秘地又开始工作了。唯一可能的线索是我们曾经在某个时刻研究过该方案(与另一个问题相关)。

1/9/12 就这样神秘地回来了。然而,从 CVS 更新后发生了这种情况。

1/10/12 发现问题出在 Xcode 的“索引”内容上,并发现您可以删除索引(和其他“派生数据”内容)并强制在 Organizer 中重建它/项目。这样做了,当我下次打开项目时,索引被重建了。然而,现在导航器只列出了测试目标中的几个文件,所以实际上是倒退了一步。

Out of the blue, the "symbol navigator" (second icon from the left in the navigator pane) started just giving me access to a single .h file. The "project navigator" continues to display the entire project.

I've tried flipping things back and forth, restarting Xcode, etc, to no avail. It's stuck on that one file.

The one clue I have is that the .h file is the only .h in the project's second target, a test target. But I don't see any way to select a target (vs the project) for navigation by the symbol navigator (and I definitely didn't "play with" any settings that might affect this.)

Any ideas? Navigation already sux in Xcode 4, and I don't need to be further hamstrung by this problem.

Additional Info: I notice that Cmd/Click on a symbol defined in the project produces "Symbol not found", when the symbol is most definitely present (and is found by search).

Sigh Mysteriously started working again. Only possible clue is that we were dinking with the scheme at one point (related to another problem).

1/9/12 Just as mysteriously returned. This happened after updating from CVS, however.

1/10/12 Figured out that the problem is with Xcode's "indexing" stuff, and found that you can delete the index (and other "derived data" stuff) and force it to be rebuilt in Organizer/Projects. Did that, and the index was rebuilt when I next opened the project. However, now the Navigator only lists a few files in a test target, so actually a step backwards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玻璃人 2024-12-31 16:17:44

干得好!多谢!

我遇到了同样的问题,具体症状如下:
1) Cmd + 单击方法调用、.h 文件、定义的名称会导致“未找到符号”消息
2)编辑器中的代码突出显示不会将上述对象绘制为颜色
3) 符号导航器 (Cmd + 2) 为空

删除管理器/项目中受影响项目的派生数据并重新打开项目解决了该问题。当您重新打开项目时,会自动执行重新索引,并且它会再次起作用!

遗憾的是 XCODE 的 bug 实在是太多了。 :-(

再次感谢 Hot Licks!

Well done! Thanks a lot!

I was having issue of the same origin, specifically here are the symptoms:
1) Cmd + Click on method calls, .h files, defined names leads to "Symbol not found" message
2) Code highlighting in editor doesn't paint the above mentioned objects in colours
3) Symbol Navigator (Cmd + 2) is just empty

Deleting derived data for affected project in Organizer/Project and reopening the project solved the issue. When you reopen the project reindexing is automatically executed and it works again!

Pity that XCODE is so buggy. :-(

Once againg, many thanks to Hot Licks!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文