Skip to main content

Windows Setup with WSL

The extension runs inside WSL (Windows Subsystem for Linux) with Ubuntu 22.04. Windows is the host OS; Ubuntu is where compilation and device communication happen.
Your machine must support virtualization. This may require an adjustment in BIOS/UEFI settings.

1 — Install WSL and usbipd

Open a Windows Administrator terminal and run:
wsl --install -d ubuntu-22.04
winget install usbipd-win
The WSL installer will prompt you to create a Linux username and password. Do not use root — the extension requires a regular user account.

2 — Restart and enter WSL

Restart your machine. Then in any terminal:
wsl -d ubuntu-22.04

3 — Prepare the Ubuntu environment

Inside the WSL Ubuntu shell:
sudo apt update && sudo apt upgrade
sudo locale-gen en_US.UTF-8
sudo update-locale
sudo apt-get install gcc bzip2 diffstat g++ adb

4 — Launch VS Code from WSL

code .

5 — Install the WSL Extension

In VS Code, install the WSL extension (by Microsoft) from the Marketplace. Refer to the official instructions.Verify that VS Code shows WSL: Ubuntu-22.04 in the status bar — see From VS Code.

6 — Connect a USB device to WSL

With a device plugged in, follow the USB forwarding guide to forward it from Windows into WSL using usbipd.