It is good practice to make a new directory for each Haxe project, so we will be making one. The Haxe extension we installed on VSCode will create some of the required files in the directory for us, but you can create the files manually if you wish.

Warning on folder location

I recommend that you avoid creating your project directory in a cloud hosted drive like OneDrive or Google Drive. It tends to create errors hard to diagnose.

On the top bar, select File > Open Folder... then create and open an empty directory. Call it whatever you want!

Hit [Ctrl/Ctrl]+Shift+P to open the “Command Palette”, then search for the Haxe: Initialize Project command. Once it is selected, hit enter to run it.

After a second or two, you will notice on the left that a few different files were created. If you don’t see them listed, make sure you are on the Explorer activity ([Ctrl/Cmd]+Shift+E):

.vscode/
	launch.json
	tasks.json
src/
	Main.hx
build.hxml
README.md

The .vscode folder is where VSCode holds some of its settings, we can safely ignore that for now. src is where all of our Haxe source code files will be written in. The build.hxml file stores settings for the Haxe compiler itself, including the location of the source files and the language we are compiling to. README.md will be used to put documentation for users of your Haxe code to read.