Robocorp Code

With the Robocorp Code extension for Visual Studio Code, you can create a new robot, run it locally, and publish it to Robocorp Cloud.

The Robot Framework Language Server extension provides code completion, syntax validation and highlighting, code formatting, and other powerful robot development features.

Install Robocorp extensions for Visual Studio Code

Install the Robocorp Code and Robot Framework Language Server extensions for Visual Studio Code from the Visual Studio Marketplace.

Robocorp Code and Robot Framework Language Server extensions for Visual Studio Code

Robocorp extensions for Visual Studio Code

Creating a new robot

  • Open the Command Palette (macOS: Shift-Command-P, Windows / Linux: Ctrl+Shift+P).
  • Select Robocorp: Create Robot..

Command Palette

Select the minimal template

Select a template

Note that a bit more extensive standard template and a pure python template are available.

Provide a name for the robot

Provide a name for the robot

Running the robot

You can run the robot in an isolated environment like it would be run in the cloud or in self-hosted environments.

  • Open the Command Palette (macOS: Shift-Command-P, Windows: Ctrl+Shift+P).
  • Select Robocorp: Run Robot.
  • If you have multiple robots in the opened directory, select the one you want to run.

The run:

  • Packages the robot just like when uploading to Robocorp Cloud.
  • Sets up a clean environment and executes the robot, just like the App and Cloud containers do.
  • Displays standard output and the results in the Debug Console panel.

The run gives you a good grasp on if your robot will work outside your own computer and if you have everything set up correctly in your robot.yaml and conda.yaml files.

Using Visual Studio Code run configuration

Another way to run your robot is to use a standard Visual Studio Code run configuration.

Open the tasks.robot file

Open the tasks.robot file

Click the Run icon and click on create a launch.json file

Create a launch.json file from the Run section

Click the Add Configuration button

Click the Add Configuration button

Select Robot: Run .robot file and save the launch.json file

Select Robot: Run .robot file and save the launch.json file

Running the robot

Select the tasks.robot file and run the robot by pressing the Robot: Current File button in the Run section, or by pressing the F5 key on your keyboard.

Run the robot

Logging in to Robocorp Cloud

Create new access credentials in Robocorp Cloud

  • Go to Robocorp Cloud.
  • Open the user menu and navigate to Settings -> Access credentials.
  • Click Add credential.
  • Provide a name, click Add.
  • Click on the View icon.
  • Click Copy to clipboard.

Login to Robocorp Cloud from Visual Studio Code

  • Open the Command Palette (macOS: Shift-Command-P, Windows: Ctrl+Shift+P).
  • Select Robocorp: Log in Robocorp Cloud..
  • Paste the access credential you copied from Robocorp Cloud.

Uploading the robot to Robocorp Cloud

  • Open the Command Palette (macOS: Shift-Command-P, Windows: Ctrl+Shift+P).
  • Select Robocorp: Upload Robot to the cloud..
  • Select a workspace.
  • Create a new robot or select an existing robot to overwrite.