Visual Studio Code with UE4

Does anyone know how to get Visual Studio Codeto work with UE4?
I have not found any documentation on this.

Hi KinDaKreator,

Unfortunately Unreal Engine 4 does not currently support Visual Studio Code. The Engine looks for an installation of the full Visual Studio IDE, so you would need to be using either Express (for Windows Desktop), Community, Professional, or Enterprise.


To tell the truth, Visual Studio Code at the time I’m writing this has not even got full C++ supporto (aka there is no Intellisense yet). It would be awesome to be able to work with VSCode on Mac, though. Is there any chance you guys at Epic will be adding something to support VSCode or any other IDE that isn’t Xcode?

I’m answering my own question. You can use the YouCompleteMe extension to add Intellisense. You will have to add the CLionSourceCodeAccess plugin to your project and let it generate the CMakefiles for you and you’re set. Pretty nice!

1 Like

Cool. Thanks.

Bringing my response from another thread in here in hopes Epic Staff will see this:

"So, I think for people trying to convince their companies to use UE4 for internal projects or even as an alternative to Unity for commercial projects (where Unity has VS Code integration #handled already), this is a VERY significant ‘barrier to entry’… you lose the “but you don’t need to pay unity up-front license costs” argument if UE4 is tethered to an IDE that costs several times (thousands) more per-seat than the Unity license in the first place…

I think this is an important feature for small (but not revenue-less) companies if they want to use Unreal. Being tethered to Visual Studio is a curse unless you’re a 5 man team w/ no significant revenue or a multi-million dollar corporation that can afford six-figure annual dev environment costs for your team.

Anyone from Epic have thoughts on this?"

I think the benefit to “small” companies would be huge and VS Code is actually a really powerful CROSS-PLATFORM editor, so there would be several benefits to providing support I think…

@spockTheGray third party plugins do provide support for VSCode which is free. Or you can use CLion if you already have a license for that or for the whole IntelliJ suite.

It’s not straightforward to setup but once you manage to do it the first time it’s all there. I’ll see if I can add some auto setup stuff to the CLionSourceCodeAccess plugin to provide all the VsCode and YouCompleteMe files and options needed. That should make it even easier to get it up and running

Hrm, I might have to check out these plugins you speak of - but I’m not sure how this would work unless these plugins are UE4 plugins (not VS Code plugins, right?). I’m guessing you can just edit w/ VS Code and then build from Unreal Editor (the pre-compiled version)?

Yes, exactly. You code with VSCode and compile with Unreal Editor. Actually you could compile from within VSCode but there’s still something buggy in the CMakefiles definitions so it won’t really work. But that’s something that might be solved with some clever work.

The CLionSourceCodeAccess plugin is an UE4 plugin so you add it to your Unreal Editor as usual. But you want to add the YouCompleteMe extension of VSCode as well if you want autocomplete to work. And it’s a bit complicated to get it working as you need to go all the way to compiling and installing a VIM plugin to get everything working, but I’ve already done it a couple of times on different development machines, so that’s definitely doable.

Thanks for the info! It’s good to know that there’s at least a working alternative - I’ll keep this in mind. The only downside then, I think, you can’t use NVIDIA’s Gameworks integrations (they have it integrated in the source on Github)… but at least this could get us working w/ pre-compiled UE4.

You probably have to wait for the next release to include Gameworks but that’s just part of using the pre-compiled engine vs the source code one. I guess you could actually make a few changes to the CLionSourceCodeAccess plugin to be able to use it with the source code version of UE4. That would require a bit of investigation, but I’m pretty sure it’s doable.

Sorry but Visual Studio Community Edition is free (you just need to register with Microsoft to get tracked on their databases…) and it has most of the Professional version features.

You can select VSCode in ue 4.18 as your preferred ide

Core Updates:

  • Visual Studio Code can now be used to write code on Windows, Mac, and Linux. To use it, select “Visual Studio Code” as your preferred IDE from the editor preferences dialog, or add the -vscode argument when generating project files on the command line.

Looks like you can’t compile…and when i try to open a file from UE 4.18.2 in VSCode, it opens an empty file…it’s supposed to be the project…any ideas ?

You can currently use VSCode for UE4 projects, you can even launch the project (run debugging and run without debugging).
However, I cannot compile the project from VSCode (Terminal -> Run Build Task). The following error message appears:

The task stays running, until you delete it, the editor does not open:

Therefore I can only compile from within the editor (Hot Reload):

Has anyone managed to build a project from VSCode?

Well, I managed to compile/build the UE4 project from VSCode.
I have changed the configuration file, like this:

    "git.ignoreMissingGitWarning": true,
    "update.mode": "manual",
    "update.enableWindowsBackgroundUpdates": false,
    "": "C:\\WINDOWS\\System32\\cmd.exe",
    "": "C:\\WINDOWS\\System32\\cmd.exe",
    "": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
    "": {
        "VsDevCmd": "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\VsDevCmd.bat\""

Where is this file located Helghast, also do you have Visual Studio installed on your computer for this to work ?