VS code intellesense not working!

These are the errors I’m getting in my header file-
#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit (A:\UE_4.26\Games\Building_Escape\Source\Building_Escape\Building_Escape.cpp).

And this too-
cannot open source file “CoreMinimal.h”

This is my cpp file-

These are the errors I’m getting in it-

#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit (A:\UE_4.26\Games\Building_Escape\Source\Building_Escape\Building_Escape.cpp)

And this one too- cannot open source file “Modules/ModuleManager.h”

Pls someone help me out as I’m dealing with these since a week, they’re not compiling too.

Hi there,
You’re not alone, I’ve got the same issue, so do many others.

The error squiggles are due to bugs in the editing program or Intellisense.
The bugs won’t prevent a successful compiling, but as a coding newbie it very frustrating trying to follow the lectures when the Intellisense tool they use does not work.

^^^ I just made another thread on this issue.

I mean, we can always do things the “proper way” and slowly refer to the actual documentation, but the Unreal Docs seem broken too.

May we both find solutions.
Cheers.

This shouldn’t be an issue on Windows. It can take a couple seconds/minutes for it to properly index everything and start working. How long have you waited?

The compileCommands.json file also doesn’t update automatically so whenever you add a new file you will need to do File > Refresh VS Code Project in Unreal.

yeah or i could spell framework right. Sorry. :smiley:

Hi @DanM,

I’m so sorry I replied so late. I’ve waited for hours but the squiggles didn’t go at all. I didn’t add any new files as you mentioned. The only files I was working with was Building_Escape.cpp and Building_Escape.c. I refreshed a couple of times but the squiggles didn’t seem to go at all.

Ateeb_Ahmed

Hi @Bananas,

Straight to the question, were u able to fix the squiggles problem?? if yes, pls tell me the solution.
I’m so sorry I replied so late, u gave ur time to fix my problem so thanks.

Cheers!!

Hi Ateeb_Ahmed,

Nah, the Intellisense is broken.
DanM and SHuRiKeN have tried helping, but from the comments of others it seems that the current versions of Unreal and VSCode still have bugs which are breaking Intellisense.

.

Those are my two threads on the issue.

The red squiggles aren’t so bad (except when they cover ALL the code!!) but it’s the adaptive auto-suggest, cross-referencing and error catching capability of Intellisense that would be very useful if it worked.

However, in my second thread you can see that I mentioned that “Intellisense being broken makes me a better learner”.
Everything takes longer and there is no quick “error catching”, so I need to search through the Unreal Documentation and take plenty of handwritten notes for each lecture.

It is very frustrating trying to follow the lectures when they use something that does not work for everyone, and it takes longer, but I’m probably understanding the concepts more thoroughly than if I relied on Intellisense.

Also, you can disable Intellisense.
That will remove all the red squiggles and make the code readable.

EDIT:
Ohh, you can’t compile?
Dang. I can’t help with that part.

Maybe ask DanM again, but forget about the red squiggles as those are false errors made by a broken Intellisense.

Good luck.

Hi @Bananas

Hmmm… I feel for you for the broken Intellisense. It compiles now though (must’ve deleted a something before taking the screenshots). @DanM, @beegeedee and fellow students are best for help.

It’s a bit of a pain though to live with a broken Intellisense. No developer likes that. I’ve seen your threads on the issue. I had 2 errors before a did a few things to my json files and C/C++ configurations too, I still do have two errors, but they are different, 1st error tell me to update my compile_commands.json, 2nd tells me that VS code is unable to open this file- UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformCompilerPreSetup.h.

You are right about the squiggles, code doesn’t look good when its all over. Intellisense indeed would’ve been useful if it wasn’t broken. I’ve worked in python too, the Intellisense helped me a lot with the errors, it tell how to fix them too.

I’ve been going through Unreal docs too, but didn’t got any satisfactory results. You mentioned 'Everything takes longer and there is no quick “error catching” ', you’re completely right. I had to deal with this problem for almost 5hrs where I wrote “display” instead of “Display”. It took infinite time to compile.

Everything’s frustrating if you right the same code but still get the errors. I’ve just started the section building escape, and I’m on Pointer Primer (not started though), so can’t tell about understanding the concepts yet, where are you though??

I think I should disable the Intellisense or I won’t really be able to go further. I’m dealing with this problem for 5 days, but got no solution, I’ve thought to move on as the code’s compiling(that’s what everyone cares about).

Any ways, if you get the solution, don’t forget to tell me.

Wish you the best mate,
BYE!!

P.S - It’s not related to the problem but still I’m asking for the sake of curiosity. Do you live in India or in another foreign country??

You are right about the squiggles, code doesn’t look good when its all over. Intellisense indeed would’ve been useful if it wasn’t broken. I’ve worked in python too, the Intellisense helped me a lot with the errors, it tell how to fix them too.

Intellisense would be an excellent learning tool for newbies.
But the old fashioned way has most likely stuck things in my head better.
Oh the irony.

Everything’s frustrating if you right the same code but still get the errors. I’ve just started the section building escape, and I’m on Pointer Primer (not started though), so can’t tell about understanding the concepts yet, where are you though??

I just finished the Building Escape last night.
I have about 80 pages of handwritten notes from the first three games.
I figured that it would be best if I treated this like an actual course… I can go over my progress from week-to-week.

And pointers… they sound simple.
But when you are referring to something that may or may not be a pointer, then trying to work out why it is one way or another, it gets confusing.

I think I should disable the Intellisense or I won’t really be able to go further. I’m dealing with this problem for 5 days, but got no solution, I’ve thought to move on as the code’s compiling(that’s what everyone cares about).

Yeah, disable it. During the Triple X game everything below the # includes was covered in red.

I just wish that the Unreal Docs were constructed better.
I’ve seen other threads on that subject.
Maybe throw in some examples like command line programs tend to do when you ask for “–help”.

And I live in Australia.
Cheers mate.

I’m now noticing that VS Code says untitled workspace. Could you show the contents of your code-workspace file?

Hi @DanM,

This was before I took the screenshots. I titled the workspace after that. Any ways, if you want the contents, here’s the screenshots-

Here are the screenshots, if you want more of them then pls let me know.

BYE!!

Hello @Bananas,

What’s up??

As you said Intellisense is great for newbies, I’ am one of them, I mean I’ve got a bit of experience of what c++ is. I’ve worked with other languages like JS and python, I even completed python midway, but had to leave it there and JS too.

Feeling glad for you man as you completed the section, CONGRAGULATIONS!! Honestly, I never took notes cause I’ve got the slides of the course + lecture’s discussions if I need help I refer to them.

Sure, already done disabling the broken Intellisense. " During the Triple X game everything below the # includes was covered in red" feeling pity for you, can’t imagine how frustrated you were to see that. Me too, if the unreal docs could’ve got better, us devs can really use them. I’ve done everything I could’ve to fix the Intellisense, and finally I give up. I’m not getting what examples are you talking about, pls just tell me in a bit more detail.

Good luck!!

You have created your project inside the directory to where Unreal is installed. Don’t do that. Only engine content would be within that directory.

Move your project to a completely different location.

1 Like

OK DanM, I will do that right now.

Helloooooo @DanM,

Bro, you’re the best!! U fixed the problem man, there ain’t anymore squiggles.

However, if you give a glance to the #includes, you’ll find that they are grey. Is there something to worry about?? Or is it fine?? Any way’s thanks once again. You’re the best Teaching Assistant.

@Bananas please consider looking at DanM’s solution, it’s working just fine now.

Bye!!

Interesting.
I’ve been following this thread.

So you have no red squiggles AND intellisense works as displayed in the lectures?
As in, full functionality?
If so, then awesome :slight_smile:

My project files were already separated.

But as a short test I re-enabled Intellisense just for the sake of checking one more time. No changes were made.

Then for the first time, Intellisense started to work!!
There were no red squiggles AND mousing over different variables and keywords revealed a plethora of popup information (just like the lectures!!)
Hooray!

Meanwhile, the output in the console log read:

[17/06/2021, 8:45:30 pm] For C source files, IntelliSenseMode was changed from "linux-clang-x64" to "linux-gcc-x64" based on compiler args and querying compilerPath: "/usr/bin/gcc"
[17/06/2021, 8:45:30 pm] For C++ source files, IntelliSenseMode was changed from "linux-clang-x64" to "linux-gcc-x64" based on compiler args and querying compilerPath: "/usr/bin/gcc"
[17/06/2021, 8:45:30 pm] For C source files, IntelliSenseMode was changed from "linux-clang-x64" to "linux-gcc-x64" based on compiler args and querying compilerPath: "/usr/bin/gcc"
[17/06/2021, 8:45:35 pm] For C++ source files, IntelliSenseMode was changed from "linux-clang-x64" to "linux-gcc-x64" based on compiler args and querying compilerPath: "/usr/bin/gcc"

Then the red squiggles returned and all Intellisense functionality was lost.
Mousing over c++ keywords resulted in error instead of the beautifully useful info they just had.
The previously loaded header files were no longer recognised.
And the following appeared in the console log:

[17/06/2021, 8:45:35 pm] Unable to resolve configuration with compilerPath "cl.exe".  Using "/usr/bin/gcc" instead.
[17/06/2021, 8:46:41 pm] "Grabber.cpp" not found in "/home/chickpea/ue/UnrealEngine/Engine/Source/ThirdParty/ShaderConductor/ShaderConductor/External/DirectXShaderCompiler/tools/clang/bindings/python/tests/cindex/INPUTS/compile_commands.json". 'includePath' from c_cpp_properties.json in folder 'Building_Escape' will be used for this file instead.

I’ve tried fixing that before, even with @DanM and @SHuRiKeN assisting.
No go.

But it was interesting how Intellisense actually started working.
Oh well. Back to note-taking.

Have fun with the Building_Escape !

I’ve got the solution to the #include problem. Follow these steps-

  1. Open command palette,
  2. Search “Disable all installed extensions”

and you’re done, it also boosts the Intellisense.

Well, if you’ve got me any tips to make the Intellisense and compile time fast, then please let me know.

BYE!!

Hi @Bananas,

Hmmm… This looks scary. I restarted unreal and VS code several times, but the Intellisense works just fine (I even refreshed VS code, but nothing bad happened). I hope everything goes like this from now on.

I hope that your broken Intellisense start working again. If it does, then pls let me know as we didn’t have the same problem. I recommend you to go further to toon tanks and enjoy that section.

Again, thanks @DanM for solving my problem. I will take care to make my new projects in a different location, THANKS A LOT!!

Screen shots of my VS code-

HOPE THE BEST FOR YOU @Bananas,
BYE!!

Can you make sure you have system clang installed on your distro and try manually selecting clang in VS Code.

Hello again SHuRiKeN,

When I hit compile in VSCode and UE4, I see multiple instances of clang appear in the system processes. So it would appear that clang is installed and being used.

From the advice of DanM, the problem cannot be solved in c_cpp_properties.json, but that file lists the compiler:

{
    "configurations": [
        {
            "name": "ToonTanksEditor Editor Linux Development (ToonTanks)",
            "intelliSenseMode": "clang-x64",
            "compileCommands": "/home/chickpea/ue/UnrealEngine/.vscode/compileCommands_ToonTanks.json",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14"
        },
        {
            "name": "Linux",
            "intelliSenseMode": "clang-x64",
            "compileCommands": "/home/chickpea/ue/UnrealEngine/.vscode/compileCommands_Default.json",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14"
        }
    ],
    "version": 4
}

Now, I’ve just started the Toon Tanks lectures.
So far I have a blank project:

When I mouse hover the #include line of the header, the following message appears:


The $workspace directory has already been added to the includePath.
I have even placed the complete path to my project files, the VSCode workspace and the UE4 Engine directories.

Anyway, I have disabled Intellisense again.
Compiling works, so does the UE4 Editor.
And those are the two important things.
Everything else is more-or-less a bonus.

Cheers.

Privacy & Terms