VS code intellesense not working!

Do you have /usr/bin/clang ? it should get install if you have the clang package installed from your distro package manager. As VS Code doesn’t use the bundled Unreal Engine clang by default.

if it does and still doesn’t get picked up
set the "compilerPath" property manually to /usr/bin/clang You can also set the property to bundled clang path.

Hi,

From the Triple X tutorials, I could see that VSCode executed the clang compiler.
But there was no /usr/bin/gcc

Strange.
So I ran the Linux package tool and installed clang.

I’d like to say that everything works.
The compiler error messages no longer appear.
And everything DOES work… until Intellisense decides to forget where to find my cpp files.

OUTPUT LOG:

[19/06/2021, 5:37:02 pm] "PawnTank.cpp" not found in "${workspaceFolder}/.vscode/compileCommands_Default.json". 'includePath' from c_cpp_properties.json in folder 'ToonTanks' will be used for this file instead.

.
.
Really, everything works… the cpp files load Intellisense coding info from the included header files.
Until the errors appear in the log.
Then everything is red squiggles.
.
.
compileCommands_Default.json

[
	{
		"file": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/Pawns/PawnBase.cpp",
		"command": "cl.exe @\"/home/chickpea/Documents/Unreal Projects/ToonTanks/.vscode/compileCommands_Default/ToonTanks.149.rsp\"",
		"directory": "/home/chickpea/ue/UnrealEngine/Engine/Source"
	},
	{
		"file": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/Pawns/PawnBase.h",
		"command": "cl.exe @\"/home/chickpea/Documents/Unreal Projects/ToonTanks/.vscode/compileCommands_Default/ToonTanks.149.rsp\"",
		"directory": "/home/chickpea/ue/UnrealEngine/Engine/Source"
	},
	{
		"file": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/ToonTanks.Build.cs",
		"command": "cl.exe @\"/home/chickpea/Documents/Unreal Projects/ToonTanks/.vscode/compileCommands_Default/ToonTanks.149.rsp\"",
		"directory": "/home/chickpea/ue/UnrealEngine/Engine/Source"
	},
	{
		"file": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/ToonTanks.cpp",
		"command": "cl.exe @\"/home/chickpea/Documents/Unreal Projects/ToonTanks/.vscode/compileCommands_Default/ToonTanks.149.rsp\"",
		"directory": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/Pawns"
	},
	{
		"file": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/ToonTanks.h",
		"command": "cl.exe @\"/home/chickpea/Documents/Unreal Projects/ToonTanks/.vscode/compileCommands_Default/ToonTanks.149.rsp\"",
		"directory": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/Pawns"
	},
	{
		"file": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/PawnTank.cpp",
		"command": "cl.exe @\"/home/chickpea/Documents/Unreal Projects/ToonTanks/.vscode/compileCommands_Default/ToonTanks.149.rsp\"",
		"directory": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/Pawns"
	},
	{
		"file": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/PawnTank.h",
		"command": "cl.exe @\"/home/chickpea/Documents/Unreal Projects/ToonTanks/.vscode/compileCommands_Default/ToonTanks.149.rsp\"",
		"directory": "/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/Pawns"
	}
]

I was unsure if the directory: should point to Engine/Source or the actual directory holding the file.
So I tried both, but neither worked.
.
.
c_cpp_properties.json

{
    "configurations": [
        {
            "name": "ToonTanksEditor Editor Linux Development (ToonTanks)",
            "intelliSenseMode": "clang-x64",
            "compileCommands": "/home/chickpea/Documents/Unreal Projects/ToonTanks/.vscode/compileCommands_ToonTanks.json",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14",
            "includePath": ["/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/Pawns"],
            "compilerPath": "/usr/bin/clang"
        },
        {
            "name": "Linux",
            "intelliSenseMode": "clang-x64",
            "compileCommands": "/home/chickpea/Documents/Unreal Projects/ToonTanks/.vscode/compileCommands_Default.json",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14",
            "includePath": ["/home/chickpea/Documents/Unreal Projects/ToonTanks/Source/ToonTanks/Pawns"],
            "compilerPath": "/usr/bin/clang"
        }
    ],
    "version": 4
}

As the Output Log is complaining about PawnTank.cpp not being found, I placed the path to that file in the includePath.
I also tried the Engine/Source path.
.
.
Right now, none of the #include files can be found.
Mousing over one of them results in:
cannot open source file "GameFramework/SpringArmComponent.h"C/C++(1696)
.
.
I regenerated the ProjectNameEditor Linux Development Build.
But that did nothing.

At this point, I am not desperate for a fix.
Following the lectures would be easier if the tool they relied up worked, but I am learning without it.

So I can understand if you want to give this up.
That’s fine.
In the long run, we are probably better off without it.

That would be my only criticism of the lectures - they use a tool that they mention may not be working, and new coders lose their grasp.

But I would still rate the lectures 5/5 particularly as they revise the script and often edit the videos for clarity - adding in extra sentences here and there.
That is something most pre-packaged tutorials don’t do.

Thanks to you and DanM for your time.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms