You have to add a build task in vscode to be able to compile.
Here is my tasks.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"taskName": "Build Development Editor Win64",
"command": "${config:UE4_Root}/Build/BatchFiles/Build.bat",
"type": "shell",
"args": [
"${workspaceRootFolderName}Editor",
"Win64",
"Development",
"\"${workspaceRoot}\\${workspaceRootFolderName}.uproject\"",
"-waitmutex"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"pattern": {
"regexp": "^(.*)\\((\\d*)\\): (\\w*) (.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4,
"column": 0
}
}
},
{
"taskName": "Regenerate Project Files",
"command": "${config:UE4_Root}/Binaries/DotNET/UnrealBuildTool.exe",
"type": "shell",
"args": [
"-projectfiles",
"-project=\"${workspaceRoot}\\${workspaceRootFolderName}.uproject\"",
"-game",
"-rocket",
"-progress"
],
"problemMatcher": []
}
]
}