This article is an overview of the VEX Visual Studio Code Extension UI(User Interface). The extension supports the development of C++ and Python projects for VEX IQ 2nd Generation, EXP, and V5 platforms.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers to enhance their coding experience.

UI Components

There are 3 major components to the VEX VS Code Extension.

  1. Toolbar
  2. Activity Bar and Side Bar
  3. Terminal Panel

Toolbar

The toolbar gives users a quick way to interact with VEX VS Code extension projects VEX Brains, and VEX Controllers. The toolbar is only active when a valid VEX project is open in VS Code. A valid VEX project is a project that is created or imported by the extension. Opening a VEXcode or VEXcode Pro project is not valid and will need to be imported.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, with highlighted sections for easy navigation and usage.

Device Picker

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for users to enhance their development experience.

The device picker has two main functions. First, it displays a brain or controller icon representing the connected VEX Device type.

Screenshot of the V5 VS Code Extension interface, showcasing features and tools available for developers using the VEX Robotics platform.

Second, when the device list icon is clicked, a quick pick list appears with all of the connected VEX Devices. The user can select which device the extension will connect to.
The current connected device will always appear at the top of the list followed by all other devices sorted by device type(Brain or Controller) and platform(IQ 2nd Generation, EXP, and V5).

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for enhancing development workflows.

Each device item contains the Brain Name, Platform, Device type and device path information.

Screenshot of the VS Code Extension for V5, showcasing the interface and features designed to enhance coding efficiency and support for V5 development.

Screenshot of the VS Code extension interface for V5, showcasing features and tools available for developers, including code snippets, debugging options, and project management functionalities.

Important

If a controller is connected to a computer, but does not have a radio link to a brain, no brain name will be displayed next to the list item or device list status bar icon.

Slot Selector

Screenshot of the V5 VS Code Extension interface, showcasing features and tools available for V5 development, including code snippets and debugging options.

The slot selector icon allows the user to pick which slot the extension will download or play a user program on.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for V5 development, including code snippets and project management options.

When the slot selector icon is clicked, a quick pick list appears with the available user program slots 1-8.

Build/Download

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, with a focus on enhancing productivity and code management.Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing options and project management functionalities.

The Build/Download icon changes functions if a VEX Brain or a VEX Controller is connected.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, with a focus on enhancing productivity and code management.

If a VEX Device is not connected then the build icon is shown. When clicked, the project will only build.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing options and project management functionalities.

If a VEX Device is connected, then the download icon is shown. When clicked, the project will build and if successful, will be downloaded to the VEX Device.

Play

Screenshot of the VS Code Extension for V5, showcasing its user interface and features, including code editing tools and VEX robotics integration.

The play icon, when clicked, runs the user program in the selected slot.

Stop

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers using the V5 platform.

The stop icon, when clicked, stops a user program.

Selected Workspace

Screenshot of the VS Code Extension for V5, showcasing its user interface and features, including code editing tools and V5 category options, designed to enhance the development experience.

VS Code supports multi workspace projects. The project selector allows users to switch between VEX projects when multiple exist inside the workspace.

Screenshot of the VS Code Extension interface for V5, showcasing features and functionalities relevant to V5 category description, including code editing tools and options for developers.

When the project selector icon is clicked, a quick pick list appears with all valid projects.

Important
If a project is not valid, it will not be shown in the project quick pick list. A project is not valid unless it has been created or imported by the VEX VS Code Extension.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing and debugging options.

Python File Selector(Python Only)
When a VEX python project is selected the python file selector will appear in the toolbar. Python for VEX only supports single file downloads currently.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing and debugging options.


When the icon is clicked, a quick pick list appears with all python files located in the workspace directory.
The python file selector allows the user to switch between python source files(.py)

VEX Activity Bar and Sidebar

Screenshot of the VS Code Extension for V5, showcasing its user interface and features related to V5 category description, including code editing tools and navigation options.

Projects Actions

Screenshot of the V5 VS Code Extension interface, showcasing features and functionalities for enhancing coding experience with VEX robotics.

The vex activity bar contains the Project Actions view and the VEX Device Info view.

The Project actions view is used for creating a new project or importing an existing VEXcode or VEXcode Pro Project.

For more information about creating a new project, check out this article!

Version information is also displayed in the bottom left and right hand corners of the view.

Important
If a VEXcode or VEXcode Pro project is open in the editor then it will not be considered a valid VEX Project, the project needs to be imported using the Import button in the VEX sidebar.

VEX Device Info

Screenshot of the VS Code Extension for V5, showcasing its interface and features, including code editing tools and V5-specific functionalities.Screenshot of the VEX V5 Code Extension interface in Visual Studio Code, showcasing key features and options available for programming V5 robotics systems.

The VEX Device Info view gives the user an overview of the connected VEX Brain or VEX Controller. VEXos Version, serial port path, user program, and device information can all be found in this view. Other functions such as VEXos firmware updates, screen shots, setting brain name and settings team number can also be performed through this view as well.

System Information

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers in the V5 category.

The system information provides a brief overview of a connected VEX Device. This includes a device’s VEXos version, Brain name, team number, Brain ID, and python runtime version information.

Serial Port Information

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code snippets and debugging options.

Serial Port information displays the device path for each port available for a VEX Device. Most VEX Devices enumerate as two serial ports. The Communication serial port is used to download programs and control the brain functions. The User serial port is used to transfer data between the user app running on the Brain and the host computer connected via USB. The V5 Controller is the only VEX device that has just a Communication serial port and no User serial port.

Programs Information

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers working with V5 projects.

Program information displays a list of all downloaded user programs on a VEX Brain.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code snippets and integration options.

Each program list item can be expanded to show additional information about each user program, such as slot location, filename, language type, filesize, and time of download.

Devices Information

Screenshot of the V5 VS Code Extension interface, showcasing features and tools available for V5 development, including code snippets and configuration options.

Devices information shows a list of all smart port devices connected to a VEX Brain. Each list item shows the smart port number and device type.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers working with V5 projects.

Each Device list item can be expanded to show firmware version information about each smart port device.

Controller linked status is displayed when connected to VEX Brain Device.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers working with VEX Robotics, including code editing and debugging options.

VEX Brain is linked to a VEX Controller

Screenshot of the VS Code Extension interface for V5, showcasing features and functionalities relevant to developers using the V5 platform.

VEX Brain is not linked to a VEX Controller

Screenshot of the VS Code Extension interface for V5, showcasing key features and tools available for developers to enhance their coding experience.

VEX V5 Controller is tethered to a VEX V5 Brain

Screen Shots

Screenshot of the VS Code Extension interface for V5, showcasing various features and tools available for developers to enhance their coding experience.

By clicking on the Camera icon, a user can take and download a screenshot from a VEX Brain.
Screen shots are only available when connected directly to a VEX Brain via USB

Battery Medic (V5 Brain Only)

Screenshot of the VS Code Extension for V5, showcasing its interface and features, including code editing tools and VEX robotics integration options.

By clicking on the Heart icon, the extension will download and run the battery medic user program.

Set Brain Name

Screenshot of the VS Code Extension for V5, showcasing the user interface and features designed to enhance coding efficiency and project management in VEX robotics development.

By clicking on the Pencil icon next to system->name , a user can set the name for a VEX Brain.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for VEX robotics programming, including code editing and debugging options.

After the Pencil icon is clicked, an input box will appear at the top of the VS Code editor. Type the new brain name in the input box and press enter to set.

Set Team Number

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers working with V5 projects.

By clicking on the Pencil icon next to system->team , a user can set the team number for a VEX Brain.

Screenshot of the VS Code Extension for V5, showcasing the user interface and features relevant to V5 category development, including code editing tools and integration options.

After the Pencil icon is clicked then an input box will appear at the top of the VS Code editor. Type the new team number in the input box and press enter to set.

Erase User Program

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing options and project management functionalities.

By clicking on the Trashcan icon next to programs->project name, a user can erase a program in a specific slot. IMPORTANT, once you erase a program it can not be recovered. Please use caution when using this feature.

Device Info Warnings

VEXos Update

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing options and integration capabilities.

When a VEX Brain’s VEXos version is out of date, a warning message icon appears next to the VEXos version and both Brain icons turn yellow.

To resolve this warning a user should update VEXos for their VEXos Brain.

Screenshot of the VS Code Extension interface for V5, showcasing features and functionality to enhance coding experience, including menus and tool options.

VEXos can be updated by clicking the up arrow next to the VEX Brain Icon.

Screenshot of the VS Code Extension for V5, showcasing its user interface and features, including code editing tools and integration options for enhanced development experience.

Also a notification box will appear in the bottom right corner of the VS Code editor when VEXos is out of date. A user can start a VEXos update by clicking the “Update” button or click the “Ignore” button to skip the VEXos update.

Brain not linked to connected Controller

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code snippets and project management options.

The VEX Controller icon will turn yellow when a VEX Controller is connected to a computer, but is not linked to a VEX Brain.

To resolve this warning a user should link a VEX Controller to a VEX Brain

Terminal Panel

The VEX VS Code Extension provides two terminals on startup, the Log Terminal and the Interactive Terminal

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code snippets and project management options.

Log Terminal

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for V5 development, including code editing and debugging options.

The Log Terminal displays build output, build error, and download results.

Interactive Terminal

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for VEX robotics development, including code editing and debugging options.

The Interactive Terminal has two functions, displaying printf logs and sending raw keystrokes back to a user program. In order to take advantage of the Interactive terminal a Brain or Controller must be connected to a computer running the VEX VS Code Extension. Interactive terminal output gets cleared by default after building and downloading a user program.

User Settings

User settings are global settings settings that visual studio code offers for each extension. User settings are applied to every VEX VS Code extension project.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code snippets and project management options.

How to access VEX user settings

Screenshot of the VS Code Extension interface for V5, showcasing features and options available for users to enhance their coding experience with VEX robotics.

Click the gear in the left hand corner of VS Code and a context menu will appear

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers in the V5 category.

In the context menu, click the “Settings” item and a settings page will appear.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing options and VEX-specific functionalities.

In the left hand list view, click on the “Extensions” item. Next, scroll down to the bottom and find the item labeled “VEX”.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing options and project management functionalities.

Click on the “VEX” list item.

Screenshot of the VS Code Extension for V5, displaying features and functionalities relevant to V5 category description, including user interface elements and code snippets.

The VEX User settings will appear in the right hand panel.

Settings Overview

Controller Channel (V5 Controller only)

The Controller Channel setting controls the radio communication channel type between a V5 Brain and V5 Controller.
This setting only applies when VS Code is connected to a V5 Controller via USB and the controller is connected to a V5 Brain via VEXnet. The user can pick between Download and Pit channels. When set to Download, the radio will jump to a download VEXnet channel once a user program download is initiated. The download channel allows for higher data rates and more efficient downloads. When set to Pit, the radio will remain on a pit channel and the download will take much longer. By default this setting is set to Download.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers working with V5 projects.

Cpp Project SDK Home

DO NOT EDIT THIS SETTING.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing and debugging options.

Cpp Toolchain Path

Cpp Toolchain Path sets the Path for the toolchain that is used when building a C++ VEX VS Code project.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code snippets, debugging options, and project management tools.

Enable User Terminal

The Enable User Terminal setting allows the extension to open the user serial port when a VEX Brain or VEX Controller is detected by the extension. The only exception applies to a V5 Controller which does not enumerate with a user serial port.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing and debugging options.

Enable allows the extension to connect to a userport on startup and will create the Interactive Terminal. If enable is selected while the extension is running, the extension will try to open the userport if a device is connected.
Disable prevents the extension from connecting to the user port on startup and won’t create an Interactive Terminal. If disable is selected while the extension is running, the extension will close the user port and remove the Interactive Terminal.

Project Build Type

Project Build Type sets how the extension will build a C++ project. The user can set the build type to Build or Rebuild.
Build only build the project when Make detects any changes in the project’s source code.
Rebuild cleans the project’s build directory, then builds the project. This option is normally much slower.

Screenshot of the VS Code Extension for V5, showcasing its interface and features, designed to enhance coding efficiency and streamline development processes for users working with V5 projects.

Project Home

Project Home sets the default home directory for a new project when completing the New Project wizard.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code editing and debugging options.

Run After Download

Run After Download when enabled, causes the user program to run after it is downloaded to a VEX Brain.

Screenshot of the VS Code Extension for V5, showcasing its user interface and features, including code editing tools and VEX-specific functionalities.

Python SDK Home

DO NOT EDIT THIS SETTING.

Screenshot of the V5 VS Code Extension interface, showcasing features and tools available for V5 development, including code snippets and project management options.

VEX Command Help

VEX Command Help allows access to documentation for specific functions included in the C++ and Python API (Application Programming Interface). Documentation is specific to each VEX Platform(IQ 2nd Generation, EXP, V5).

Screenshot of the VS Code Extension for V5, showcasing its user interface and features, including code editing tools and integration options for VEX robotics programming.

To access VEX Command Help, first highlight the text of the function to search for.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code snippets and debugging options.

Right Click on the selected text, and a context menu will appear.
Next Click on the VEX Command Help to access documentation.

Screenshot of the VS Code Extension interface for V5, displaying features and tools available for developers, including code snippets and project management options.

If VEX Command Help finds an exact match, a new webview will appear with relevant documentation.

Screenshot of the VS Code Extension interface for V5, showcasing features and tools available for developers, including code snippets and project management options.

If multiple documents match the selected text, then a drop down will appear with a filtered list of relevant documentation.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: