VS Code for Mac build process is unclear (no default build task)

In the Unreal Engine 4.18 release notes there is a note saying VS Code is now supported on Mac, Windows and Linux. Awesome! I would like to use VS Code on my macintosh.

When I selected VS Code as my editor, however, I ran into multiple problems with unclear interface or documentation. For the following, I am running Unreal Editor 4.18.0-3709383+++UE4+Release-4.18 on Mac OS X 10.12.6 (16G29) with XCode 9.1 (9B55) and VS Code 1.18.0 installed. I added VS Code to a project by selecting VS Code as my “source code editor”, adding a C++ file, and selecting “Open VS Code” from the File menu.

  1. Your public messaging does not correctly indicate how to enable VS Code. The only note I find about VS Code on mac is the 4.18 release note. The release note says “To use it, select ‘Visual Studio Code’ as your preferred IDE from the editor preferences dialog”. This is actually not accurate, the preference in the preferences dialog is titled “source code editor”. The wording matters because the preferences dialog is very long and it has a search box that takes a string. It took me some time to figure out how to enable VS Code because I was searching the preferences dialog for “IDE” when I should have been searching for “Source code editor”. My expected behavior is that the release note should say “source code editor” instead of “IDE”. An even better expected behavior would be that there should be an actual page in the documentation explaining the source code editor preference and what the supported options are on each platform.

  2. You have not set a “default” build task, which makes it very confusing as a new user how to build or clean. When I execute “run build task”, I see this:

"UnrealTSTemplate" is the name of my project. However this is disorienting: As a new user I do not understand the difference between "Debug", "DebugGame", "Development", and "Test". I also do not understand the difference between "UnrealTSTemplate" and "UnrealTSTemplateEditor". I **do** find, in the Unreal documentation, [this page](https://docs.unrealengine.com/latest/INT/Programming/Development/BuildConfigurations/index.html) which explains the difference between all of these different options. However it took me a while to find this page and understand what it is saying (I'm honestly still a little confused— I think I want "Editor" "Development"?)

By comparison, this is what XCode looks like:

In XCode, there is no ambiguity. XCode is preconfigured to build in some appropriate mode (I assume "Editor" "Development"). VS Code **could** also be preconfigured to build in the appropriate default mode. The proper way to do this in VS Code is with the "isDefault" key in `tasks.json`, [as documented here](https://code.visualstudio.com/docs/editor/tasks). If I edit my `tasks.json` so that the development build stanza says: 

`"taskName": "UnrealTSTemplateEditor Mac Development Build", "group": { "kind": "build", "isDefault": true },`

...instead of just `"group": "build"`, then "Run Build Task" will build that instead of bringing up the new-user-unfriendly menu.

My **expected behavior** is that when you generate a `.vscode`/`tasks.json`, you should write the `isDefault` flag for the appropriate default (ie: whatever the default is on XCode). An **even better expected behavior** is that in addition to setting the `isDefault` flag, you could make the Build Configurations Reference page more new-user friendly by putting a sentence in the introduction explicitly saying "The recommended configuration when developing with Unreal Editor is Development/Editor" (or whatever). This would have helped me figure it out quicker. (You do say midway down the page that Development is the default in that category, but one has to read the entire page to realize this.)
  1. There is no “clean all” option. As shown above there are many configurations, VS Code’s interface for presenting configurations is less helpful than that of other IDEs and unfortunately VS code does not seem to(?) have a “default clean” option the way it does a “default build” option(?). VS Code also unfortunately does not have a “clean all” option like normal Visual Studio does. It is not obvious to me from either the configurations reference page or the interface whether cleaning (for example) the Mac DebugGame configuration will also clean the Mac Development configuration. Because of this it would be very helpful, especially to new users, if there were by default a “Clean All” task in VS Code which cleans all installed configurations and platforms.

Note: I describe three separate issues in this single bug report. If it isn’t clear, issue #2 (no isDefault in tasks.json) is the most important.

Hi mcclure111,

Sorry for not getting back to you on this sooner. I took a look at the three issues that you mentioned, and I am not sure that they are actually bugs. I just wanted to provide an initial point of clarification before addressing each of the three issues that you mentioned. VS Code is not an IDE, it is a lightweight Code Editor. With addons it is possible to get functionality similar to an IDE, but VS Code itself is not an IDE and we do not expect it to function like one.

  1. The option to select your preferred editor has always been called “Source Code Editor,” even before VS Code was added as an option. Unfortunately the wording in the 4.18 release notes is not strictly accurate as you noted, but that is unlikely to be updated. We can certainly look into the possibility of expanding our documentation in this area.

  2. While the list of build tasks is rather lengthy, we do not anticipate that a brand new user will be using VS Code. For UE4, we recommend using either Visual Studio (on Windows) or Xcode (on Mac). Both of these options are full IDE’s, and we focus on making sure the Engine works well with them. If someone chooses to use VS Code instead, we expect that they are already somewhat familiar with either the Engine, VS Code itself, or both. We do not recommend using VS Code if someone is brand new to both the Engine and using VS Code. While it is possible to set a default build task to use when running Run Build Task, it may not be readily apparent to new users of VS Code how they can select a different build task if they wish to do so. In this instance it comes down to a choice of providing all of the options every time, or depending on the user to know how to select other tasks when they are needed. It is generally better to provide the options, since anyone who is familiar with how to select another build task would also be familiar with what needs to be done to set a build task as the default task.

With regards to preferred build state and target, Development Editor is the one that is used most often. Other combinations are possible depending on your needs at any given point in the development of your project.

  1. The lack of a “Clean all” task is somewhat unfortunate, and we may look into possibly including something like this in the future. However, this again becomes a question of who is most likely to be using VS Code with the Engine. For someone who is already familiar with VS Code, it would be a relatively simple process to add their own “Clean all” task. On the other hand, it may be better to present individual Clean options to someone who is less familiar with VS Code. This is something that we would have to think about.