3
votes

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. 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. 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? Does the IDE keep a log of on-the-fly parsing/compilations anywhere?

2
I'd say, check your #definesPieter B
@PieterB Which #defines?David Heffernan
@DavidHeffernan I've had problems with codecompletion when I used #ifdefs and the code without ifdefs wouldn't be logical.Pieter B
@Pieter: Thanks! Done that already. I also checked for other occurrences that are known to cause trouble to the code completion engine, such as missing semicolons in the last line of a try-finally block or duplicate {$R *.res} items.MiGz
@PieterB Delphi does not use #define or #ifdef. Are you thinking of a different language?David Heffernan

2 Answers

1
votes

Is there a way to find out WHERE exactly the Code Insight/Code Completion compiler is failing?

Not readily, not without debugging the IDE.

Does the IDE keep a log of on-the-fly parsing/compilations anywhere?

No.


I suggest that you install Andy Hausladen's 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.

0
votes

I recently had the same problem using 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.