Robocorp Visual Studio Code Overview
Install the Robocorp Code and Robot Framework Language Server extensions for Visual Studio Code from the Visual Studio Marketplace.
Creating a new robot
- Open the Command Palette (macOS:
Shift-Command-P
, Windows / Linux:Ctrl+Shift+P
). - Select
Robocorp: Create Robot
.
Select the Standard
template
Note that a bit more extensive
Extended
template and a purePython
template are also available.
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.
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.
Running using Command Palette
- 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.
Running using the Activity Bar
- Click the Robocorp icon in the Activity Bar.
- Select the robot and the task.
- Click the launch icon.
Running using run configuration
Another way to run your robot is to use a standard VS Code run configuration.
Open the tasks.robot
file
Click the Run
icon and click on create a launch.json file
Click the Add Configuration
button
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.
Debugging the robot
You can add breakpoints and debug the robot execution.
- Add a breakpoint in the robot script.
Debugging using the Command Palette
- Open the Command Palette (macOS:
Shift-Command-P
, Windows:Ctrl+Shift+P
). - Select
Robocorp: Debug Robot
.
Debugging using the Activity Bar
- Click the Robocorp icon in the Activity Bar.
- Select the robot and the task.
- Click the debug icon.
Linking to Robocorp Cloud
- Open the Command Palette (macOS:
Shift-Command-P
, Windows:Ctrl+Shift+P
). - Select
Robocorp: Link to Robocorp Cloud
. - Press
Enter
to open Robocorp Cloud, where you can add new access credentials. - Click
Add 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 Robocorp Cloud.
Unlinking and removing credentials from Robocorp Cloud
- Open the Command Palette (macOS:
Shift-Command-P
, Windows:Ctrl+Shift+P
). - Select
Robocorp: Unlink and remove credentials 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 Robocorp Cloud
. - Select a workspace.
- Create a new robot or select an existing robot to overwrite.
Video instructions
You can also see the whole workflow and follow along in this short video series:
Watch us code a full robot from scratch in this live-coding video. The robot Google Translates song lyrics from source to target language and saves the original and the translated lyrics as text files:
Changelog
View the Robocorp extension changelog to keep up-to-date with improvements and new features!