Skip to content

VSCode IDE Setup

1Jordan edited this page Aug 23, 2021 · 3 revisions

After setting your Linux environment with Docker, your only way to write code is through basic text editors from your local machine or terminal editors through the Docker container. If you want a more modern setup with code auto-completion, syntax highlighting, and built in documentation, continue reading.

Download VSCode

First step is to download VSCode here. VSCode is a modern, open source development environment created by Microsoft and has a ton of extra plugins, managed through the built in extension store.

Install Extensions

Open VSCode. On the left bar, click the extensions icon (or press Ctr+Shift+X). This will bring up the extension manager. Now, search for and install these extensions:

  1. Remote - Containers
  2. Python
  3. C/C++

The key extension here is the first one, which allows VSCode to connect into the docker container from the host machine and understand code context from within the container (where ROS is installed).

Attach to Container and Start Coding

After installing the extensions, restart VSCode and startup the DEV docker container. Now click on the button in the bottom left with the two chevrons and select "Attach to Running Container." You should be able to select the running dev container. Now, VSCode is loaded in the container and all files in the container will show up.

Open the /opt/ros/dev_ws and code ROS packages with auto-completion!