A VSCode extension (prototype) for simulating Opentrons Python protocols directly in VSCode and visualizing and inspecting the state of the Deck (work surface) and liquid volume changes in real time through a Webview panel.
The following are required to use the extension:
- Python 3.8 or later must be installed, and the
python3command must be available in PATH - The
opentronsPython package must be installed
pip install opentronsIf you need to use this extension with an OT-2, you will need to install opentrons v9.0.0 or previous versions since v9.1.0+ does not support OT-2.
pip install opentrons==9.0.0If you want to use this extension with Flex and OT-2, you will need to create a virtual environment and install opentrons packages separately. Then switch an environment on VSCode's Python Interpreter via Command Palette.
The following uses python3 to create virtual environments because it does not require to install any packages or software. You can use any virtual environment manager you prefer such as conda or uv.
python3 -m venv .Flex
source .Flex/bin/activate
pip install opentronspython3 -m venv .OT2
source .OT2/bin/activate
pip install opentrons- Open an Opentrons protocol
.pyfile in VSCode. - Start Protocol Visualizer. Currently, there are 3 ways to start it:
- From the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P), runOpentrons: Open Protocol Visualizer. - Click the beaker icon in the status bar.
- Set a new shortcut via Command Pallets
Open Keyboard Shortcutsand start it with your custom shortcut. - When the Visualizer panel opens on the right side of the screen, and
If your protocol uses Runtime parameters, Protocol Visualizer will generate UI inputs for these parameters.
Once the analysis is complete, you are ready to edit your protocol.
This extension supports custom labware definitions. You need to place your custom labware definition files in the same directory as your protocol file.
Protocol Visualizer starts analysis automatically when you save changes to your protocol file.
This extension is using VSCode's Auxiliary Window, so you can pop out the Visualizer panel to a separate window. Also you can do the same thing with dragging the Protocol Visualizer tab to somewhere of your screen.
For Runtime parameters, you will need to click Analyze button to apply your changes to your protocol. If you change a Runtime parameter, Protocol Visualizer will not change your protocol.
Runtime parameters function creates a temporary protocol file that applyes your changes as a default parameter value for the analysis and it will be removed whne the visualization is done.
The step jumper that is located under Protocol Steps allows you to jump to a specific step in your protocol. Input the step number and hit Enter to jump to that step.
If you encounter any errors or bugs, please report them to the #visualization-extension channel or Koji Kanao via DM/email.
MIT License © 2026 Koji Kanao