Visual Studio Code not working with UE
I have started using Unreal Engine and wanted to switch from VS 2017 to VSC because intellisense in VS is not very good and often simply stop working. I have set VSC to be the source code editor in UE and created a new Project called "MyProject". I also created a new C++ component called "NewActorComponent". I have installed all required plugins for VSC. However there are a lot of errors in VSC:
When trying to start the debugger I got two seperate errors, depening on which depug mode is choose: (Debug) Error pop-up: "Builderror during preLaunchTask "MyProject Win64 Debug Build" VSC terminal: ERROR: UBT ERROR: Failed to produce item [...]MyProject-Win64-Debug.exe
In addition the terminal says the program exited with code 1 (see 2 pictures above).
Deleting the folders .vscode and Intermediate does not help. In short: It's impossible to work with VSC as the code editor with Unreal Engine.
Also: I have set VSC to be the DEFAULT source code editor ("Set as Default") however, this is NOT SAVED when restarting the computer!
Check this link for a fix, you just need to rebuild the unreal build tool after making the relevant changes to VSCodeProjectFileGenerator.cs (Github account is required to view the link, must also be liked with your unreal account, see https://www.unrealengine.com/en-US/ue4-on-github for help with that if required)
Presumably the bug fix will be merged and included with the next update to the Unreal engine.
answered Mar 13 '18 at 06:42 PM
I have managed to eliminate some bugs:
I still have some bugs left:
I also have errors on GENERATED_BODY(): "overloaded function "UClass" is not a type name", the function BeginPlay() and TickComponent(): "member function declared with 'override' does not override a base class member". Those bugs can be resolved when I inlcude Engine.h in the headerfile, but this is not and acceptable sollution, because this is not how it should work.
(I am not sure if either of these are the right answer) Have you tried uninstalling both VS2017 and VSC and then reinstalling them?
answered Feb 20 '18 at 10:44 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here