Hey there, yeah I agree. Do not disable Intellisense, doing so is essentially reverting us to the age of VI and spamming make compile, to trial-and-error for compile errors.
->> PURE SPECULATION:
A guess at the how, from what I can tell (i.e. my educated guess) UE4’s build tool seems to enumerate the files given via the include paths in your Project.Build.cs, and internally handles the includes and calling the make tool on each and or throws everything into a moshpit.
A guess at the why: it was probably done a while ago (i.e. UE3 or earlier) to ease the headache of include paths for cross referenced / inter-dependent projects / modules / libraries. I.E. note how you selectively include modules in your Project.Build.cs, imagine old school of adding paths of desired modules to your compiler’s and linkers include list. Additionally, the automated build tool’s code is likely eased a great deal in complexity, as a result. All-in-all, it cannot be removed, as it would wreck havoc in terms of backwards compatibility and alter the way we compile and maintain projects (and certainly break the automated build tool).
END SPECULATION <<-
As for how to fix it, I’ve not found a practical way. Intellisense compatibility does not seem to be a priority for Epic. Personally, I just ignore the Intellisense include error and occasionally just uncheck Intellisense errors from appearing in the error list (right click in the error window and uncheck “show Intellisense errors”). Intellisense in UE4 projects will just simply not work up to par as it normally does…
I (and from what I gather, a lot of other UE4 c++ programmers) use VAssistX to supplement intellisense, and it works well enough. VAssistX pre-scans your solution and holds symbols internally (rather than trying to lookup through includes) so it gets around UE4’s nonsense include path method.
Otherwise, welcome to the nightmare of programming in UE4’s version of C++ (does not play well with advanced IDE’s). :(.