Robocorp Visual Studio Code Overview
Install the Robocorp Code extension for Visual Studio Code from the Visual Studio Marketplace.
Robocorp Code extension provides the toolchain to create, run and deploy bots as well as the Robocorp activity bar.
Robocorp activity bar and Command palette
Robocorp Code extension brings in the Robocorp activity bar. From the activity bar, you can find most of the commands with UI buttons to perform them.
All commands are also available via Command palette
:
- Windows/Linux:
Ctrl+Shift+P
, macOS:Shift+Command+P
- Type
robocorp
to see the list or type what you are looking for, likeRun Task Package (Robot)
Creating a new task package
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Create Task Package (Robot)
. - Select a template.
Running the task package
Running using Command Palette
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Run Task Package (Robot)
. - If you have multiple tasks in the opened directory, select the one you want to run.
Running using the Activity Bar
- Click the Robocorp icon in the Activity Bar.
- Select the task.
- Click the launch icon.
Debugging the task package
You can add breakpoints and debug the task execution.
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Set python executable based on robot.yaml
. - Add a breakpoint in the python script.
Debugging using the Command Palette
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Debug Task Package (Robot)
.
Debugging using the Activity Bar
- Click the Robocorp icon in the Activity Bar.
- Select the task.
- Click the debug icon.
Linking to Control Room
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Link to Control Room
. - Press
Enter
to open Control Room, where you can add new access credentials. - Click
+ New Access Credential
. - Provide a name, click
Add
. - Click on the
View
icon. - Click
Copy to clipboard
. - In VS Code, paste the access credential you copied from Control Room.
Unlinking and removing credentials from Control Room
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Unlink and remove credentials from Control Room
.
Uploading the task package to Control Room
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Upload Task Package (Robot) to the Control Room
. - Select a workspace.
- Create a new task package or select an existing task package to overwrite.
Connecting to Control Room vault
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Connect to online secrets vault
. - Select the correct workspace and the extension will enable the Vault.
- You can now use Vault secrets defined in the Control Room without local
vault.json
files.
Disconnecting from Control Room vault
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Disconnect from online secrets vault
.
Using work items
Key concepts
Work items created and used in VS Code are for local development and testing only; they do not affect or transfer to Control Room executions.
For development, work items are just folders under devdata
:
work-items-in
: Folder to store your input work items.work-items-out
: Folder where the execution places the work item outputs. These should be excluded in.gitignore
as outputs are changing and dynamic.work-items.json
is a reserved file name used to identify work item structures; you can define multiple work items in it. If your work item uses files, you should place those files into the work item folder.
Usage
You can find the Work items
panel in the Robocorp Code extension activity bar.
From the Work items
panel, you can...
- Create new work item inputs, bringing in template content to get started.
- Open work items to view and edit.
- See the output work items from previous runs >
work-items-out
. - Copy a run output work item as an input work item.
- Delete work items.
- If the task contains work items, the execution of the task package will ask you which work item you want to use as input. You can select inputs and previous run outputs for execution:
Import and switch profiles
For companies that are using SSO with Robocorp Control Room or have stricter/complex network setups like network proxies etc., the user needs a profile configuration
You can import and switch profiles in the side panel or via command-palette commands: Robocorp: Import Profile
and Robocorp: Switch Profile
You can use Robocorp Setup Utility to create the profiles. It provides UI tooling to create, test, export, and manage the profile configs.
In short use:
Robocorp Setup Utility
to create and test the profile configuration that works in your network.- Export and deliver the single
.yaml
-file to the VS Code user
Open a Task Package environment terminal session
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Terminal with Task Package (Robot) environment
.
Clear Robocorp (RCC) environments
- Open the Command Palette:
Ctrl+Shift+P
(macOS:Shift+Command+P
). - Select
Robocorp: Clear Robocorp (RCC) environments and restart Robocorp Code
.
Video instructions
You can also see the whole workflow and follow along in this short video series:
Changelog
View the Robocorp Code -extension changelog to keep up-to-date with improvements and new features!