- Get started
- Build
- Deploy and run
- Examples
- Reference
Build in VS Code
How to build, debug, and deploy workflows in Visual Studio Code with the UiPath extension, from installation and sign-in to commands and settings.
The UiPath for Visual Studio Code extension adds the Flow canvas to Visual Studio Code (VS Code), a free code editor. It opens workflow files, which have the .flow extension, in a visual editor, signs you in to UiPath, and deploys your work to UiPath Automation Cloud.
The Flow canvas, nodes, variables, and debugging are the same in every environment. This page covers what is specific to VS Code: installing the extension, signing in, and deploying from a local workspace. Your first workflow builds a workflow from start to finish.
Before you start
You need:
- VS Code 1.110.0 or higher.
- A UiPath account. Sign up describes how to create one.
- Internet access to UiPath Automation Cloud.
- Node.js and npm, the tools for running and installing command-line programs, installed so that a terminal can find them. On first sign-in, the extension uses npm to install the UiPath command-line tool,
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
- Install UiPath Maestro from the VS Code Marketplace or Open VSX Registry.
- Reload VS Code when prompted.
- Select the UiPath icon in the Activity Bar to open the UiPath Maestro view.
The UiPath Maestro view has these sections:
- Connect shows who is signed in, the connection status, and the organization and tenant you work in.
- Create New, with the solutions, projects, and workflows in your workspace below it.
- Resources lists what the tenant already has, such as deployed processes, with a search box.
- Issues lists the problems in your workflows.
- Build & Deploy shows the package status, the Deploy button, and the deployment history.
Sign in
The extension signs you in through your web browser. It never stores your tokens.
- In the Connect section, select Sign In.
- If the CLI isn't installed yet, accept the prompt to install it. The extension runs
npm install -g @uipath/cli. - Your browser opens to complete sign-in. The extension receives the result on port
8104of your own computer. - After you authorize, return to VS Code. Your session refreshes automatically from then on.
To sign out, select Sign Out in the Connect section. This signs you out in-process and clears the cached session.
Sign-in uses port 8104 on localhost for the OAuth callback. If sign-in fails, a stale process may be holding the port. Free it and try again. On macOS or Linux, run lsof -ti :8104 | xargs kill -9. On Windows, run netstat -ano | findstr :8104 to find the process ID, then taskkill /F /PID <id>.
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.
- Run UiPath: Select Environment to confirm your environment. The default is Cloud.
- Run UiPath: Select Tenant to pick your tenant. The Connect section shows the organization that the tenant belongs to.
To switch tenants later, select the arrows next to the organization and tenant in the Connect section.
The Resources section then lets you browse folders and resources for the selected tenant.
Result: The Resources section lists the folders and resources of your selected tenant.
Create or open a workflow
To create a project:
-
In the UiPath Maestro view, select Create New.
-
In the New Project list, select Maestro Automate. The list also offers Maestro Orchestrate and Data Fabric (Preview).
The project opens on the Flow canvas, and the bottom toolbar shows Maestro Automate.
To open an existing workflow, select its .flow file in the Explorer, or run Flow: Open Flow (Ctrl/Cmd+Alt+O).
Data Fabric entities, which model the data that workflows read and write, can be created and edited in the same workspace, as a Preview capability. Entities in VS Code describes how. Studio Web opens solutions that contain an entity project.
Build with Autopilot
Autopilot (Preview) 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, then open the chat with UiPath Autopilot: Open Autopilot. Describe the workflow, and Autopilot builds it.
Validate a workflow
Validation errors and warnings appear as you edit, in the Issues section of the UiPath Maestro view and in VS Code's Problems panel.
Select any entry to navigate directly to the offending node on the canvas, including nodes inside subflows. To validate on demand instead of waiting for the panel to update, run Flow: Validate Flow (Ctrl/Cmd+Shift+V).
Deploy a workflow
Deploying from VS Code packages the workspace as a UiPath solution and deploys it to UiPath Automation Cloud. Deploy a workflow describes what deploying does.
In the Build & Deploy section of the UiPath Maestro view, select Deploy. It packages the solution and deploys it in one step. The arrow next to Deploy offers each step on its own:
- Package only builds the package without deploying it.
- Deploy only deploys a package that you already built.
After a deploy, the Build & Deploy section shows the status of the last package and the history of your deployments.
You can also run these actions from the Command Palette, which opens with Ctrl+Shift+P, or Cmd+Shift+P on macOS. For example, run UiPath: Package & Deploy. VS Code extension lists every command.
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.
Test a workflow
Select Run Debug (▶) in the bottom toolbar of the canvas. A dialog asks for the values of the trigger's inputs, such as productId and customerId. Enter them and start the run. The workflow runs in your selected tenant, and each node shows its status on the canvas as the run progresses.
The Executions tab below the canvas follows the run:
- Debug runs lists your test runs, with their status and duration.
- Execution trace lists each node that ran, in order, with how long it took. Expand an agent node to see its agent run and model calls.
- The run's details show its Variables, Incidents, and Metadata.
The other tabs, Datasets, Evaluators, and Eval runs, hold your evaluations. To turn a test run into an evaluation data point, select the flask icon, Add a data point to run an evaluation, in the bottom toolbar. Evaluations describes how they work.
Debugging basics describes how to read a run and resolve failures.
Next steps
- Your first workflow: the order intake workflow, built step by step in about 15 minutes.
- VS Code extension: commands, keyboard shortcuts, settings, and troubleshooting.
- Deploy a workflow: what deploying does.
- Debugging basics: how to read a run and resolve failures.
- Evaluations: check a workflow against sample inputs.
- Community: ask questions and share workflows with other builders on the UiPath Forum.