File menu on vscode.dev
In vscode.dev, the File menu is located in the hamburger button (â°) in the top-left corner of the page.
A VS Code extension for making retro-style video games with Microsoft MakeCode Arcade. Code, create pixel art, design levels, and play your game in the VS Code app or at vscode.dev!
If youâre using the VS Code app instead of vscode.dev, make sure the Microsoft MakeCode Arcade extension is installed. Check by going to the View menu and chose Extensions (View > Extenstions). If you donât see the extension in the installed list, search for it by typing âmakecodeâ in the search box. When it appears in the results list, click the Install button.

When the Microsoft MakeCode Arcade extension is enabled, You can access the MakeCode Asset Explorer by clicking on the MakeCode icon in the Visual Studio Code action bar.

At the top of the asset explorer youâll find a list of ACTIONS for managing MakeCode Arcade projects.

To start a new MakeCode project in VS Code, you first need to open an empty folder (File > Open Folder). If you donât have an empty folder ready, go create one with your computerâs file manager.
Once youâve opened a folder, you can create an empty project by clicking the âCreate an empty projectâ command in the MakeCode Asset Explorer.
If you have a share link for a MakeCode Arcade project, you can also import it by clicking the âImport project from URLâ command and pasting the URL in the input window that appears.
If you have opened a GitHub repository that contains a MakeCode Arcade project, youâll need to install your projectâs dependencies for features like intellisense to work. Click the âInstall project dependenciesâ command in the ACTIONS section of the MakeCode Asset Explorer to download and install them.
Inside your MakeCode project, youâll see a folder structure that looks something like this:
project/
ââ built/
ââ main.ts
ââ pxt.json
...Donât worry if you donât see all of these files or if your project contains more than whatâs listed here! Weâre just going to go over the important ones first:
built/ - contains all of the compiled code for your project. If you compile your project, the result will show up inside this directory.main.ts - is the main code file for your project. This code will run when you run your game.pxt.json - is the file that configures your project. More on that below!Some other files you might see in your project include:
*.jres and *.g.jres - these files contain the assets for your project like images, animations, songs, and tilemaps. See âManaging your projectâs assetsâ below for more information on assets.*.g.ts - these files are autogenerated when the assets for your project change. Donât edit these by hand!README.md - this is a markdown file where you can add documentation for your project that other people can read when they import it.main.blocks - if you imported your project, it might have a blocks file inside. You canât edit this file inside of VS code!tsconfig.json - this file is required to make features like intellisense work in the editor. You probably donât need to edit it!.github, mkc.json, .vscode, .gitignore, .prettierrc, assets.json - These are all advanced configuration files. You can safely ignore them!The pxt.json file is very important and itâs required in all MakeCode projects. Be careful when editing this file! If contains invalid JSON or is missing required fields, your project might stop working. Always check for errors before saving it!
Some of the more important fields in this file are:
device extension; make sure not to remove it if you want your project to work with MakeCode Arcade!.ts, .jres, .g.ts, .g.jres, and .md files should be listed here.Whenever you create a new file that you want to be included in your project, you need to add it to the files entry inside pxt.json. If you arenât seeing your changes when you run your game, make sure you didnât leave a file out!
Click the âStart MakeCode simulatorâ command in the MakeCode Asset Explorer to run your game inside of VS Code. A new view pane for the simulator will open after the project has finished compiling and will automatically reload whenever you save a file in the open workspace.

To use your keyboard to control the simulator, make sure to click on the simulator pane first so that it has input focus.
All serial messages and exceptions from the simulator are printed in VS Codeâs output view pane. If the output view pane is hidden, you can open it from the View menu in the top bar (View > Output).
Once the pane is visible you can view all MakeCode messages by selecting âMakeCodeâ from the dropdown in the top-right:

All of your projects images, tilemaps, animations, and songs will be listed inside the MakeCode Arcade Asset Explorer. Clicking on an asset from this list will open the asset editor. Any changes made to an asset inside of this editor will be automatically saved in your project.
To create a new asset, hover over the asset type in the MakeCode Asset Explorer and click the âCreate Fileâ icon that is shown:

To edit an existing asset, click on its name in the asset explorer to open it in the asset editor. To rename an asset, change its name in the text input that appears in the bottom of the asset editor. If you donât see the text input, you may need to increase the width of the pane that the asset editor is in.

When you hover over the name of an asset, two icons will appear next to it:

To reference an asset youâve created inside your code, you can use the name you gave it with one of the tagged templates in the assets namespace:
let myImage = assets.image`imageName`;
let myAnimation = assets.animation`animName`;
let myTile = assets.tile`tileName`;
let myTilemap = assets.tilemap`tilemapName`;
let mySong = assets.song`songName`;
To add a MakeCode extension to your project, click the âAdd an extensionâ command in the ACTIONS section of the MakeCode Asset Explorer. Then either select an extension from the list that appears or paste a GitHub URL for an extension repository in the text input and press Enter.
After you add an extension to your project, an entry for it will automatically appear inside your pxt.json file.
To remove an extension, run the âMakeCode: Remove an extensionâ command in the VS Code command palette and select the extension to remove.
If you manually edited your projectâs pxt.json file and need to reinstall the projectâs dependencies, click the âInstall project dependenciesâ command in the ACTIONS section of the MakeCode Asset Explorer.
To compile your project and download it to hardware (e.g. a Meowbit), first run the âCompile project to uf2/hexâ command in the ACTIONS section of the MakeCode Asset Explorer. Once the compile finishes, you can find the generated hex/uf2 file under the built/ folder in your project workspace. Depending on what hardware you selected to compile for, the file may be under an additional subdirectory (e.g. built/n3/binary.hex). The file will be named either binary.hex or binary.uf2.
Right click on the uf2/hex file in your built/ folder and select âReveal in File Explorerâ or âReveal in Finderâ to locate the downloaded file on your computer:

Connect your hardware to the computer with a USB cable. It should appear as a USB drive in your computerâs file explorer. If you donât see the USB drive, see âTroubleshooting hardware connectionsâ below.
Right click on the uf2/hex file in your built/ folder and select âDownloadâŠâ to download the uf2/hex file to your computer:

Connect your hardware to the computer with a USB cable. It should appear as a USB drive in your computerâs file explorer. If you donât see the USB drive, see âTroubleshooting hardware connectionsâ below.
If your hardware is failing to show up as a USB drive when you plug it in, try the following steps:
To create a share link for your project, click the âCreate a share linkâ command in the MakeCode Asset Explorer. This will cause the output pane to open with a link that you can copy/paste.
To change the name of your shared project, see the pxt.json section above.
See the developer guide for info on developing for vscode-makecode.