当 Eclipse CDT 索引器卡住时我该怎么办?

ein*_*ica 6 workflow indexer eclipse-cdt freeze

我正在使用 Eclipse CDT 2020-06(但我在早期版本中也发生过这种情况。)

有时,Eclipse CDT 在解析某些文件时会卡住。百分比指标不前进;并按任务的取消按钮使其“取消请求”,但它仍然卡在这种状态。因此,我不仅不能在我的项目中使用索引,而且大多数其他“异步”任务也会排队并且无法执行。当这种情况发生时,我现在基本上放弃并重新开始;也许最终会使用过滤规则屏蔽掉行为不当的文件。

我的问题是:我可以采取更好的措施来处理索引器卡住的情况吗?

编辑:

如果我使用 -debug 运行 Eclipse 并启用索引器调试,我得到的唯一输出是:

Indexer: start PDOMFastIndexerTask
Indexer: parsing /cuda-api-wrappers/examples/other/io_compute_overlap_with_streams.cu
Run Code Online (Sandbox Code Playgroud)

这就是我陷入困境的地方。

ks1*_*322 0

我可以采取更好的措施来处理索引器卡住的情况吗?

您可以尝试自己调试 Eclipse 索引器。使用以下选项从控制台运行 Eclipse -debug

eclipse -debug <options file>'
Run Code Online (Sandbox Code Playgroud)

其中 <选项文件> 内容是:

org.eclipse.cdt.core/debug=true
org.eclipse.cdt.core/debug/indexer/activity=true
org.eclipse.cdt.core/debug/indexer/statistics=true
org.eclipse.cdt.core/debug/indexer/problems=true
Run Code Online (Sandbox Code Playgroud)

当索引器卡住时查看调试输出。您可能会看到来自索引器的一些错误消息,可以进一步通过谷歌搜索。

  • 所以,我就这么做了。没有错误消息 - 它只是卡在某个文件上。而且该文件本身并不是特别值得注意。最后一个控制台输出行是:“索引器:解析/cuda-api-wrappers/examples/modified_cuda_samples/matrixMulDrv/matrixMul.cu” (2认同)