# Build in VS Code

> Build, debug, and deploy Case, Flow, and BPMN processes in Visual Studio Code with the UiPath Maestro extension.

The **UiPath Maestro** extension brings Case, Flow, and BPMN from Maestro Orchestrate to Visual Studio Code (VS Code), a free code editor. You build processes on your own computer, next to your code repository and your coding agent, and deploy them to Orchestrator.

The extension opens each process on the same canvas that Studio Web uses:

| Capability | Process file | Status in VS Code |
|---|---|---|
| Flow | `.flow` | Generally available |
| Case | `caseplan.case` | Preview |
| BPMN | `.bpmn` | Preview |

Case and BPMN in VS Code are available in Automation Suite only.

Nodes, elements, variables, and debugging work the same way they do in Studio Web. This page covers what is specific to VS Code: installing the extension, signing in, creating projects, and testing and deploying from a local workspace. [VS Code extension](vs-code-extension.md) lists every command, setting, and fix for common problems.

## Before you start

You need:

- [VS Code](https://code.visualstudio.com/download) **1.110.0** or higher.
- A UiPath account with access to Maestro Orchestrate in Automation Suite.
- Internet access to your UiPath environment.
- [Node.js](https://nodejs.org/en/download) and npm, the tools for running and installing command-line programs, available on your `PATH`. On first sign-in, the extension uses npm to install the UiPath CLI, `uip` (`npm install -g @uipath/cli`).

If you work in a remote workspace, such as Windows Subsystem for Linux (WSL), SSH, Codespaces, or a dev container, the extension runs on the remote host. Install Node.js and npm there, not on your local machine, so that the UiPath CLI is installed on the remote host too.

## Install the extension

1. Install **UiPath Maestro** from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=uipath.uipath-maestro) or [Open VSX Registry](https://open-vsx.org/extension/uipath/uipath-maestro). The same extension also builds Maestro Automate workflows.
2. Reload VS Code when prompted.
3. Select the **UiPath** icon in the Activity Bar to open the UiPath Maestro view.

The UiPath Maestro view has these sections:

- **Connect** shows your sign-in status, environment, and tenant.
- **Solution Explorer** lists the solutions and projects in your workspace.
- **Resources** lists folders and Orchestrator resources for the selected tenant once you sign in.

## Sign in

The extension signs you in through your web browser. It never stores your tokens.

1. In the **Connect** section, select **Sign In**.
2. If the CLI isn't installed yet, accept the prompt to install it. The extension runs `npm install -g @uipath/cli`.
3. Your browser opens to complete sign-in. The extension receives the result on port `8104` of your own computer.
4. After you authorize, return to VS Code. Your session refreshes automatically from then on.

To sign out, select **Sign Out** in the **Connect** section. If sign-in fails, [Sign-in fails](vs-code-extension.md#sign-in-fails) lists the fixes.

## Select your environment and tenant

After you sign in, choose where you are working. Commands run from the Command Palette: press `Ctrl/Cmd+Shift+P`, type the command name, and select it.

1. Run **UiPath: Select Environment** to confirm your environment. The default is Cloud.
2. Run **UiPath: Select Tenant** to pick your tenant or organization.

**Result:** The Resources section lists the folders and Orchestrator resources of your selected tenant. The Case and BPMN canvases load from this tenant, so sign in before you open a Case or BPMN project.

## Create a project

Each project holds one process, built with Case, Flow, or BPMN. Decide which one fits before you create the project. [Choosing a canvas](choosing-a-maestro-modeler.md) compares them.

1. In the **UiPath Maestro** view, select **Create New**.
2. In the **New Project** list, under **Maestro Orchestrate**, select **Case** (Preview), **Flow**, or **BPMN** (Preview).

   The list groups project types by product. It also offers **Flow** under **Maestro Automate**, and **Agent** (Preview) and **Data Fabric** (Preview) under **Building Blocks**.

   ![The New Project list in VS Code, grouped by product: Flow (Recommended) under Maestro Automate; Case (Preview), Flow, and BPMN (Preview) under Maestro Orchestrate; Agent (Preview) and Data Fabric (Preview) under Building Blocks.](https://dev-assets.cms.uipath.com/assets/images/maestro/vscode-new-project-grouped-5349e4d2.webp)

**Result:** VS Code creates a solution with the project in it and opens the project on its canvas.

To open an existing process, select its file in the Explorer. A `.flow`, `caseplan.case`, or `.bpmn` file opens on its canvas.

A BPMN process opens with its start event and tasks on the canvas, and the **Properties** panel on the right.

![A BPMN process open in VS Code: a start event connected to a task on the canvas, and the Properties panel with the Action menu open, listing None, Agent, Connector, Human Task, Queues, Tools, and Workflows.](https://dev-assets.cms.uipath.com/assets/images/maestro/vscode-bpmn-canvas-57af9424.webp)

A Case process opens with its trigger and stages on the canvas, the Case manager bar at the top, and the stage properties on the right.

![A Case process open in VS Code: a trigger connected to Stage 1 on the canvas, the Case manager bar with Plan and Rules at the top, and the Stage properties panel on the right.](https://dev-assets.cms.uipath.com/assets/images/maestro/vscode-case-canvas-7b280eed.webp)

### Add a project to a solution

A solution can hold several projects, such as a case, the BPMN processes and flows it calls, and the agents its tasks use. To add one, select **Create New** in the **Solution Explorer** title bar with the solution open, then follow the same steps.

You can also create a project from the canvas. In a Case or BPMN process, when you add a task, choose to create a new process or agent instead of picking an existing one. For example, in a BPMN process, select **Workflows** > **Start Maestro Flow** > **Create new Maestro Flow**. The extension adds the new flow to the solution as a new project and opens it.

Let the new project finish loading before you switch back to the process you came from.

Data Fabric entities can be modeled in the same solution, as a Preview capability. [Entities in VS Code](https://docs.uipath.com/data-service/automation-cloud/latest/user-guide/entities-in-vs-code) describes how.

## Build a process

Build, connect, and configure the process on the canvas exactly as you would in Studio Web:

- **Case:** stages, tasks, and rules. Refer to [Case build guides](case-build-guides.md).
- **Flow:** nodes, triggers, and variables. Refer to [Flow build guides](flow-build-guides.md).
- **BPMN:** events, tasks, gateways, and variables. Refer to [BPMN build guides](bpmn-build-guides.md).

On every canvas, you can add connector activities and create their connections, use resources from the same solution, and write expressions in the expression editor.

### Build with Autopilot

Autopilot is available in VS Code as a separate extension, **UiPath Autopilot**, published by UiPath. To install it, open the Extensions view (`Ctrl+Shift+X`, or `Cmd+Shift+X` on macOS), search for **UiPath Autopilot**, and select **Install**. Then sign in with **UiPath Autopilot: Sign In** in the Command Palette, and open the chat with **UiPath Autopilot: Open Autopilot**. Describe the process, and Autopilot builds it, whether it's a Case, Flow, or BPMN process.

You can also let a coding agent, such as Claude Code or Codex, write the process file while the canvas is open. Changes made to the file outside the canvas appear on the canvas. [Ways to build](ways-to-build-with-maestro.md#coding-agents) links to the coding agent guides for each canvas.

## Validate a process

Validation errors and warnings appear as you edit, in VS Code's **Problems** panel, alongside your project's other diagnostics.

Select any entry to go to the element or node that causes it. For Flow, to validate on demand instead of waiting for the panel to update, run **Flow: Validate Flow** (`Ctrl/Cmd+Shift+V`).

## Debug a process

Debugging in VS Code runs the process in your selected tenant. **Debug** is turned off while the project has issues that prevent a run. Fix every issue in the **Problems** panel first.

- **Flow:** run the flow from the editor and follow it in the live debug view. Refer to [Debugging basics](debugging-effectively.md).
- **Case and BPMN:** select **Debug** on the canvas. Each element shows its status as the run progresses. Breakpoints and step-by-step debugging work as they do in Studio Web. Refer to [Debugging](debugging.md).

When a solution holds several projects, such as a case that calls a flow, debugging one project also builds the projects it calls.

## Differences from Studio Web

Case and BPMN work in VS Code as they do in Studio Web, with these differences:

- You can create only Case, Flow, BPMN, and agent projects in VS Code. Create every other project type, such as apps and API workflows, in Studio Web. In a Case or BPMN task, you can pick an existing app or API workflow, or keep the task as a placeholder and choose one later.

## Package and deploy

You publish from VS Code by packaging your workspace as a UiPath solution and deploying it to Orchestrator. Every project in the solution, whether Case, Flow, BPMN, or agent, is packaged and deployed together, so you don't publish each project separately.

- **UiPath: Package** builds a `.uipx` solution from the current workspace.
- **UiPath: Deploy** uploads a packaged solution to Orchestrator.
- **UiPath: Package & Deploy** runs both steps together.
- **UiPath: Switch Deploy Target** changes the destination folder.

By default, the extension activates the deployment after a successful deploy. To deploy without activating, turn off the `uipath.autoActivateDeployment` setting.

To run the same package from the UiPath CLI, run **UiPath: Generate .env File**. This writes a `.env` file compatible with `uip`.

[Deploying a flow](deploying-a-flow.md) and [Publishing and upgrading agentic processes](publishing-deploying-and-upgrading-agentic-processes.md) describe what happens after you deploy.

## Next steps

- [VS Code extension](vs-code-extension.md): commands, keyboard shortcuts, settings, and troubleshooting.
- [Choosing a canvas](choosing-a-maestro-modeler.md): which canvas fits your process.
- [Your first Flow](quickstart.md): build a flow from start to finish.
- [Entities in VS Code](https://docs.uipath.com/data-service/automation-cloud/latest/user-guide/entities-in-vs-code): model Data Fabric entities in the same solution.
