简体   繁体   English

德尔福代码完成失败

[英]Delphi Code Completion Fails

We use Embarcadero Delphi 2010 and recently a change was made to one of the units of a medium-sized project, causing code completion to stop working completely -- but only inside this project, it still works fine in other projects. 我们使用Embarcadero Delphi 2010,最近对一个中型项目的一个单元进行了更改,导致代码完成停止工作 - 但只有在这个项目中,它仍然可以在其他项目中正常工作。 Puzzled, I searched the interwebs for clues on what exactly could make this happen, but my search wasn't too successful. 困惑的是,我在网站上搜索了究竟能让这种情况发生的线索,但我的搜索并不太成功。

From what I gathered, it looks like IDE has a few parsers/compilers that work completely separated from one another, which makes it entirely possible that the faster code-completion compiler could fail where the main compiler would not. 从我收集到的内容看起来,IDE有一些解析器/编译器完全相互分离,这使得更快的代码完成编译器完全有可能在主编译器不会失败的地方失败。 Which is exactly what's happening to my project. 这正是我的项目正在发生的事情。

My question: Is there a way to find out WHERE exactly the Code Insight/Code Completion compiler is failing? 我的问题:有没有办法找出Code Insight / Code Completion编译器失败的原因? Does the IDE keep a log of on-the-fly parsing/compilations anywhere? IDE是否在任何地方保存动态解析/编译日志?

Is there a way to find out WHERE exactly the Code Insight/Code Completion compiler is failing? 有没有办法找出Code Insight / Code Completion编译器失败的原因?

Not readily, not without debugging the IDE. 不容易,不是没有调试IDE。

Does the IDE keep a log of on-the-fly parsing/compilations anywhere? IDE是否在任何地方保存动态解析/编译日志?

No. 没有。


I suggest that you install Andy Hausladen's IDEFixPack. 我建议您安装Andy Hausladen的IDEFixPack。 If that does not help then use your revision control to isolate the code change that causes the problem. 如果这没有帮助,那么使用您的版本控制来隔离导致问题的代码更改。 And find a different way to write that code that happens not to bork code completion. 并找到一种不同的方式来编写不会出现代码完成的代码。 Trial and error is likely to be the most productive method here, much as I hate to say that. 试验和错误可能是这里最有效的方法,就像我不愿意这样说。

I recently had the same problem using Delphi 10.2. 我最近使用Delphi 10.2遇到了同样的问题。 After a lot of research I found that I had inadvertently declared a variable in a type section with an end; 经过大量的研究,我发现我无意中在一个带有结尾的类型部分中声明了一个变量; following on the next line. 紧接着下一行。 Removing the errors restored the code completion function. 删除错误恢复了代码完成功能。 So I would recommend combing the interface for an error or restoring a backup from the directory history. 所以我建议梳理接口以查找错误或从目录历史记录中恢复备份。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM