The Intellisense and code suggestion not working properly !

Hi Guys;

Today, I installed Unreal 4.14.0 , and Visual Studio 2015. The problem is :

  1. Visual Studio compiles fine but shows still red lines!
  2. The intellisense and code suggestion not working properly :

&stc=1

&stc=1

It is the first error you need to pay attention to . It is this that is causing the problem . “Cannot open source file”

It cannot find the header file that is #included in the pawn.cpp therefore none of the code in the .cpp is valid as it can’t find the definitions for it.

Not sure what causes this. Google returns multiple things to try . In you’re source files when you do a search is the actual header file present or is it unable to find it??

1 Like

Intellisense is extremely slow on large projects like UnrealEngine. It can take a very long time to show correct information, if at all.

If you’re planning on spending any significant time in C++ and UE I’d recommend Visual Assist X or Resharper (although I’ve only used the former).

1 Like

This is a known bug, you can fix it by compiling, switching to Development solution configuration and switching back.

Intellisense is finnicky with UE4, here are some tips when it isn’t working as it should:

  • It will always fail parsing a new C++ class because a lot of the definitions are in the .generated.h file, which won’t exist until you compile the class at least once.
  • If it still can’t parse your class, try re-generating the Visual Studio project file.
  • As a last resort, you can try closing Visual Studio, delete the .db file and .vs folders that are alongside the project file and re-open it. This will re-generate the cache.

Thanks guys , :frowning: but none of these solutions working for me !

Don’t know your issue, but just wanted to say: Do NOT regenerate project files… It is so frustrating, because it completely wipes out all filters and you have just 300 classes in one large list…

Usually restarting VS and waiting fixes it. Also try CTRL + J every now and then.

Also have a read here, maybe it helps https://forums.unrealengine.com/showthread.php?93546-For-those-who-suffer-from-Visual-Studio-IntelliSense-slowness

Apparently VS 15 (not the same as VS 2015) that’s still in beta has a much better C++ intellisense built into it, but until then I would recommend trying a trial of Visual Assist X or Resharper to see if that fixes it.

1 Like

I use visual community 2015 and my intelli sense works just fine . Although I think having 32gb of ram definitely helps because it parses the .h files quicker.

Also sometimes there are certain .h #includes that used to be necessary to include to get certain fumctionality but now are already included in the engine code so by including again can cause errors

Only time I get the errors like original post is when there is a typo error somewhere or a .h include is wrong . For example my whole project broke because I was using a #include “BlueprintFunctionLibrary.h” and sneaky unreal had now changed it to “KismetBlueprintFunctionLibrary. h” etc

Sometimes these errors are caused by moving files and folders or renaming things too . Other than that can’t really advise much else because my problens were easily fixed where as the OP problem seems to be more difficult

Hi guys;
Finally I solved it: :slight_smile:
In Unreal Editor , I just changed the “Editor Preferences\ Source Code\ Source Code Editor” option, from “Visual Studio” to “Visual Studio 2015”.

&stc=1

There is an extension called UE4 Intellisense…for the Macros like UPROPERTY. Do a search inside of VS 2015. Seems to work OK for me… Although, can be slow, like folks have already said.

teak

UE4 Intellisense - Visual Studio Marketplace

1 Like

Will that work with VS 2019?

It seems unlikely, as it was last updated in 2016 :frowning:

I haven’t tried it myself, but you might want to check out Using the UnrealVS Extension for Unreal Engine C++ Projects | Unreal Engine 5.3 Documentation

1 Like

I haven’t tried it at all, I just shared the link.
I recommend using Visual Assist X, it solved all my problems.

I’m using resharper already…

1 Like

I had this problem today (with a fresh release of the 4.25, and the vs2019), and tried this: in the Editor - “files”, “refresh visual studio 2019 project”. And it seems helped. Just in case: i’m using the Live Coding too.

You could also update to 2019 visual studio, lots of things are improved and fixed over 2015.

This worked for me (after I setup the UnrealVS extension as per Using the UnrealVS Extension for Unreal Engine C++ Projects | Unreal Engine 5.3 Documentation)