Workbench | Quickstart (original) (raw)

Quick start: Workbench

Installation

Particle Workbench is an integrated development and debugging environment for Windows, Linux, and Mac, based on Visual Studio Code (VSCode).

VSCode installation

Download screen

Go to the VisualStudio Code download page and download the appropriate installer.

Windows - VSCode installation

Windows options

NOTE: due to limitations with the local compiler's build system, usernames (or paths) with spaces will be converted to short paths like C:\Users\EXAMPL~1

Linux - VSCode installation

NOTE: due to limitations with the local compiler's build system, paths with spaces cannot be supported at on Linux this time

Mac - VSCode installation

NOTE: due to limitations with the local compiler's build system, paths with spaces cannot be supported at on Mac this time

Workbench extension installation

Once you have VS Code installed, you can add in the Particle workbench extension.

Install

Install

The core installation will take a few minutes. There's an indicator at the top of the extensions panel that shows the install is still in progress. When complete, you'll be prompted to reload. Click the Reload Now button.

Reload

After reload, some more components will be installed and you will be prompted to install the Particle Local Compiler. This is recommended.

Local Compiler

Create a project

To create your first project, you'll start with the Command Palette.

The Command Palette provides access to many commands such as open files, search for symbols, and see a quick outline of a file, all using the same interactive window. It can be invoked via cmd+shift+p on Mac OS or ctrl+shift+p on Linux and Windows.

In the Command Palette select Particle: Create New Project. The matching is very flexible - you don't have to type that whole thing in or scroll through the list. You could just type project and that would typically be the first match.

A small popup window will appear in the lower right corner of the window. It's easy to miss if you're not expecting it. Use the Open button to select the parent directory.

Select Directory

For example, if you had a directory named "Projects" in your "Documents" directory where you kept your Workbench projects, you'd select Projects.

Then you'll be prompted for the name of your project. This will create a new directory within the directory you just selected. Your project files will be in that directory.

Project Name

Your first project workspace should look something like this:

First Project

Compile a project

Before you can build in the cloud (the way Particle Web IDE and Particle CLI normally build), you need to select the device you wish to build for.

From the Command Palette select Particle: Configure Project for Device.

Configure Device

Then the device OS version you'd like to build for:

Configure Device

Then the type of device to you'd like to build for:

Configure Device

And finally the name or device ID of the device you want to flash to. You can leave this blank if you're going to flash by USB, or just want to test building.

Configure Device

To compile your program and download the binary, open the Command Palette and select Particle: Cloud Compile. To compile your program in the cloud and flash it to the selected device over-the-air, select Particle: Cloud Flash.

Compile or Flash

Migrate from the Web IDE

For larger projects, development teams, and products, we recommend Particle Workbench instead of the Web IDE. If you are currently using the Web IDE and want to migrate to using Workbench, you can use the Web IDE Export Tool to export your projects for use with Workbench.

Learn more

You can learn more about Workbench features in the Particle Workbench Tutorial.