Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>MPyFlowNew to Visual Studio Code? Get it now.
MPyFlow

MPyFlow

markpekar

| (0) | Free
Fast, native-addon-free MicroPython extension for VS Code (ESP32, RP2040/Pico, STM32, ESP8266) powered by a persistent mpremote sidecar.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
MPyFlow Icon

MPyFlow

Plug in any MicroPython board and start coding in seconds.
Zero manual Python setup · Smart board-aware autocomplete · Live interactive terminal · Drag-and-drop file manager

License: MIT VS Code Boards


MPyFlow Demo

Why MPyFlow?

  • Works out of the box — even without Python installed. MPyFlow creates its own isolated .venv, installs mpremote, and automatically downloads a standalone Python 3.12 via uv if no system Python is available.
  • No broken native serial bindings. Uses MicroPython's official mpremote transport over a persistent sidecar — no C++ Node/Electron native addons that break after VS Code updates.
  • Zero COM-port conflicts. File browsing, uploads, script execution, and the interactive REPL all share one persistent serial connection.
  • Board-aware MicroPython autocomplete. Connect an ESP32, Raspberry Pi Pico, or STM32 and MPyFlow automatically installs the right MicroPython type stubs and configures Pylance/Pyright for your workspace.
  • Effortless run & switch controls. Run any script with a single click (▶), stop infinite loops instantly (■), or jump straight to another script (⏭) without manually interrupting first.

Quick Start

  1. Connect your board via a USB data cable.
  2. Open the MPyFlow icon in the VS Code Activity Bar and click your board under Devices.
  3. Click the green ▶ next to any .py file to run it immediately — or drag files/folders between Repository and On Board.

Key Features

Unified Project & Board Explorer

Everything lives in one clean sidebar:

  • Project → On Board: Browse files and folders on your microcontroller. Click any file to open it directly (mpremote:///...) and press Ctrl+S to save straight back to flash.
  • Project → Repository: Manage your local workspace files (supports single-root and multi-root workspaces) with New File, New Folder, Rename, and Delete.
  • Bidirectional Drag & Drop: Drag single files, multi-selections, or entire folders from Repository (or VS Code Explorer) onto On Board to upload — or drag from On Board back to Repository to download.
  • Project Sync (.mpyignore): Sync only changed files between your workspace and the board while skipping ignored paths.

Interactive MicroPython Terminal

  • Live streaming output: print() output streams in real time — even for infinite while True: loops (no arbitrary 10-second timeout).
  • Interactive input() support: Type directly into the terminal when your script waits for user input.
  • Smart per-file controls:
    • Green ▶ — Run file on board.
    • Red ■ (with green ● running highlight) — Stop the active script (Ctrl+C).
    • Amber ⏭ — Stop the currently running script and immediately launch another file.
  • Instant REPL access: Click Open REPL (>_) anytime to stop any running task and drop straight into >>> .

Built-in mip Package Manager & Board Controls

  • Install libraries over USB: Click the package icon on On Board (or run MicroPython: Install Package (mip)) to install packages from micropython-lib or GitHub (e.g. umqtt.simple, ssd1306, github:user/repo/package.json) directly into /lib — no Wi-Fi required on the board.
  • Soft Reset (Ctrl+D) & Hard Reset (machine.reset()) right from the sidebar header.

Supported Boards

MPyFlow works with any microcontroller supported by mpremote and automatically installs matching IntelliSense stubs on connect:

Board / Port Auto-detected Stubs
ESP32 / ESP32-S2 / ESP32-S3 / ESP32-C3 / ESP32-C6 micropython-esp32-stubs
ESP8266 micropython-esp8266-stubs
Raspberry Pi Pico / RP2040 / RP2350 micropython-rp2-stubs
STM32 / Pyboard micropython-stm32-stubs
SAMD21 / SAMD51 micropython-samd-stubs
Unix / Other MicroPython ports micropython-unix-stubs / micropython-stdlib-stubs

Troubleshooting

My board doesn't appear under Devices

  • Make sure you are using a USB data cable (many charging cables have no data lines).
  • Install the USB-UART driver for your board's chip (click No USB board found — Driver & cable help in Devices or run MicroPython: USB Drivers & Cable Help for official CP210x, CH340, and FTDI links).

failed to access COMx / PermissionError

  • Another program (Thonny, Arduino IDE, PuTTY, or another VS Code window) currently holds the serial port. Close it and click Connect again.

ImportError: no module named '...' when running from Repository

  • Running a file directly from Repository executes it in RAM without copying sibling files. Drag the required helper .py file (or folder) into On Board, or install the library via Install Package (mip).

Settings Reference
Setting Default Description
espMpremote.autoSetupEnv true Automatically create isolated local .venv and install mpremote + MicroPython stubs.
espMpremote.autoDownloadPython true Auto-download standalone Python 3.12 via uv if no system Python 3 with venv is found.
espMpremote.stubsPackage "auto" Auto-detect connected board stubs or pin a specific stubs package.
espMpremote.autoConfigureIntelliSense true Automatically configure .vscode/settings.json for Pylance / Pyright.
espMpremote.baudrate 115200 Default serial baudrate.
espMpremote.reconnectTimeoutMs 5000 Delay before auto-reconnecting after an unexpected USB disconnect (0 to disable).
espMpremote.enableMockDevice false Show virtual mock://esp32-mvp simulator for testing without hardware.
Architecture & Development
VS Code Extension (TypeScript)
  ├── EnvironmentManager (isolated .venv + uv standalone Python fallback + per-port stubs)
  ├── IntelliSenseConfigurator (.vscode/settings.json for Pylance / Pyright)
  ├── MpremoteBridge (NDJSON / JSON-RPC 2.0 over stdio)
  ├── DeviceFileSystemProvider (mpremote:/// virtual filesystem)
  ├── ProjectSync (incremental sync + .mpyignore)
  ├── ReplTerminal (native vscode.Pseudoterminal — REPL + live script stdin/stdout)
  └── ExplorerTreeProvider (Project -> On Board / Repository + Devices, bidirectional DnD)
          │
          ▼  stdio (NDJSON)
Python Sidecar (python/bridge.py)
  ├── RealSerialSession (mpremote.transport_serial.SerialTransport + mpremote.mip)
  └── MockTransport (optional mock://esp32-mvp simulator)
# Install dev dependencies & compile TypeScript
npm install
npm run compile

# Run all automated tests (bridge + local venv/stubs + 8 user-flow tests)
npm test

# Run live hardware test suite on a connected board
node scripts/test-hardware.mjs COM3

# Package extension into .vsix
npx @vscode/vsce package

Press F5 in VS Code to launch the Extension Development Host.


License

MIT © 2026 markpekar

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft