Visual Studio Code is Having multiple problems

Context: I removed the CLang-Format extension as it was causing problems
image
This started causing the first problem + the second problem
After that, I reinstalled the Clang-Format extension but it did not solve anything.

The first problem: Whenever I chose to save the file either using (ctrl + s) or going to “File” and clicking “Save”
it does this thing where it kind of compacts it.


before saving


after saving

Problem 2: I have the VSCode Intellisense Fix installed but for some reason, it’s not working anymore (after the Clang-Format thing) as is apparent in the screenshots from the first problem (and yes I launched vs code from Unreal engine)

My Installed Plugins




image

  1. That’s what clang-format does. Format on save is mostly likely enabled which will trigger formatting. The C/C++ extension already includes clang-format so you don’t actually need a separate extension.

    There are a bunch of settings for it, see
    Clang-Format Style Options — Clang 13 documentation
    Though a quick Google and you can find a configuration tailored for Unreal
    https://gist.github.com/intinig/9bba3a3faee80250b781bf916a4ab8b7
    You should just need to create a file called .clang-format within your Source folder and the C/C++ extension should pick it up.

  2. Have you enabled it in the settings? Could you show the output of it?

Searching for *.uproject file...

Extension "UE Intellisense Fixes" is now active!

Found Unreal Engine v4.27.2

Fixing compiler path in c_cpp_properties.json.

Cpu: AMD Ryzen 5 3600 6-Core Processor              

Extension compiler path isn't set. Will not force compiler path in c_cpp_properties. (Not an error)

If the extension's compiler path setting was previously set you should reset your UE project to get back the c_cpp_properties default path.

Fixing compiler paths in compile commands.

Will not override compiler path in compile commands file. (Not an error)

Below is the compile commands first entry command. (WARNING) If getting errors and the compiler path is unexpected reset your UE project.

command: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\cl.exe" @"C:\Users\stefan\Documents\UE Games\Unreal Engine C++ Course\BullCowGame-starter-kit\.vscode\compileCommands_BullCowGame\BullCowGame.210.rsp"

Compile Command Object wasn't modifed. Will not write file.

Below is the compile commands first entry command. (WARNING) If getting errors and the compiler path is unexpected reset your UE project.

command: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\cl.exe" @"C:\Users\stefan\Documents\UE Games\Unreal Engine C++ Course\BullCowGame-starter-kit\.vscode\compileCommands_Default\BullCowGame.210.rsp"

Compile Command Object wasn't modifed. Will not write file.

Below is the compile commands first entry command. (WARNING) If getting errors and the compiler path is unexpected reset your UE project.

command: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\cl.exe" @"C:\Users\stefan\Documents\UE_4.27\.vscode\compileCommands_BullCowGame\BullCowGame.210.rsp"

Compile Command Object wasn't modifed. Will not write file.

Below is the compile commands first entry command. (WARNING) If getting errors and the compiler path is unexpected reset your UE project.

command: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\cl.exe" @"C:\Users\stefan\Documents\UE_4.27\.vscode\compileCommands_Default\BullCowGame.210.rsp"

Compile Command Object wasn't modifed. Will not write file.

Done fixing compiler paths.

Fixing invalid paths in response files.

No invalid paths returned. No fixes needed.

No invalid paths returned. No fixes needed.

End fixing invalid paths in response files.

Fixing missing compile command files.

No missing file paths found. No fixes needed.

No missing file paths found. No fixes needed.

End fix missing compile commands.

Attempting to fix UE workspace(Add empty tag parser).

UE's tag parser includes are set to empty array for performance.

The setting limitSymbolsToIncludedHeaders is already set to true.

End fix UE workspace(Add empty tag parser).

Attempting to fix wrong cppStandard.

Extension's cppStandard setting was set to empty string.

Intellisense will use cpptools cppStandard setting instead of this extension's setting.

End fix wrong cppStandard.

Fixing launch.json.

launch.json didn't need to be changed.

End fix launch.json.

Start fix wrong intellisense mode

Cpu: AMD Ryzen 5 3600 6-Core Processor              

Intellisense mode doesn't need to be fixed.

End fix wrong intellisense mode.

Optional Fixes aren't enabled in the settings.

No need to write BullCowGame CCppProperties. It was unchanged.

No need to write UE4 CCppProperties. It was unchanged.

Extension is done.

I did the .clang-format think I am not sure I did it correctly tho

(I pasted https://gist.github.com/intinig/9bba3a3faee80250b781bf916a4ab8b7 in)

It still has the squiggles

it shouldn’t have a file extension. It’s just .clang-format, no .txt.

Could you try getting the latest version of the Intellisense Fixes extension (just in case) and completely re-installing it.

bet

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

Privacy & Terms