Using VSCode with 4.18 Preview 1

Hi everyone,

as I read the release notes for 4.18 I was excited about the possibility to have support for VSCode.

Unfortunately I can’t generate the project files.

What I did so far is:

  1. I created a new c++ basic code test project
  2. I switches the preferred IDE to VSCode in editor settings
  3. Right click on UProject shows only the old generate VS project files (would expect VSCode project files)
  4. The log shows me a command line where the “-vscode” switch isn’t active.
  5. Grabbed the command line in the log and added the “-vscode” switch to it and started in command prompt

The command prompt gives me the error

“ERROR: UnrealBuildTool Exception: Invalid compiler version (Default)”

NOTE: Running on Windows 7 with Visual Studio 2017 and VSCode 1.16.1 x64

Do I need to update the context menu? Or which command line I need to call to generate the “.vscode” files. This is the whole output from command line:

C:\Program Files\Epic Games\UE_4.18\Engine\Build>“C:/Program Files/Epic
Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe” -projectfiles -project=“C:/Us
ers/schaaf/Documents/Unreal Projects/Test_VSCode/Test_VSCode.uproject” -game -ro
cket -progress -vscode
Discovering modules, targets and source code for project…

@progress ‘Binding IntelliSense data…’ 0%

@progress ‘Binding IntelliSense data…’ 50%

@progress ‘Binding IntelliSense data…’ 100%

@progress ‘Writing project files…’ 0%

@progress ‘Writing project files…’ 33%

@progress ‘Writing project files…’ 67%

@progress ‘Writing project files…’ 100%

Discovering modules, targets and source code for project…

@progress ‘Binding IntelliSense data…’ 0%

@progress ‘Binding IntelliSense data…’ 50%

@progress ‘Binding IntelliSense data…’ 100%

@progress ‘Writing project files…’ 0%

@progress ‘Writing project files…’ 33%

@progress ‘Writing project files…’ 67%

ERROR: UnrealBuildTool Exception: Invalid compiler version (Default)

Kind regards

Andre Schaaf-Ledermüller
Heideland GameWorks

I downloaded the source and changed in “VSCodeProjectFileGenerator.cs:191” from

string[] VCIncludePaths = VCToolChain.GetVCIncludePaths(CppPlatform.Win64, WindowsCompiler.Default).Split(’;’);

to

string[] VCIncludePaths = VCToolChain.GetVCIncludePaths(CppPlatform.Win64, WindowsCompiler.VisualStudio2017).Split(’;’);

then it generates the “.vscode” files correct.

Hello andreschaaf,

Thank you for reporting this issue. I’m currently looking into this and will let you know once I find out more. I’m glad to see that you were able to find a way to fix it in the source build however.

After speaking with the person who is responsible for the implementation of Visual Studio Code with UE4, he mentioned that there were some changes that were added to 4.18 that caused the implementation to become broken. At the moment, Visual Studio Code implementation is not functional. It should be functional in the near future, so please keep up to date on the next Previews for fixes.

Thank you!

I’m looking forward to it :slight_smile:

when will this get fixed? Also can you answer this question? Unreal Engine Please install [clang](https://clang.llvm.org/) or check configuration `clang.executable` - C++ - Unreal Engine Forums
Will Unreal Engine also intellisense for VSCode. I mean better than Visual Studio? VSCode uses TypeScript which pretty fast in doing runtime syntax checks and stuff right?

Did this feature actually make it into the 4.18 release today?

I tried a fresh build from the 4.18 branch on Sunday the 22nd, and VSCode support was still broken.

I really hope a fix made it into the editor before the 4.18 release, given that it was advertised in all of the pre-release announcements.

VSCode should have been working with Windows since Preview 2. When you say that it’s “broken”, in what way do you mean?

Im having exactly the same issue with the current update source on release. Trying to generate files for the ue4 engine itself. It says its completed the task but no project files are generated

Hello Bad^^Eye, are you still experiencing this issue? If so, please try running GenerateProjectFiles.bat from the command prompt manually so that the windows stays after the operation is finished, so you can see if there are any errors or warnings that could indicate what is wrong.