FTC Core for VS Code
Create, build and deploy FIRST Tech Challenge robot code in VS Code or VSCodium, without Android
Studio.
Unofficial. FTC Core is a community project. It is not made, affiliated with, endorsed or
supported by FIRST® or the FIRST® Tech Challenge. FIRST®, FIRST® Tech Challenge and FTC® are
trademarks of FIRST (For Inspiration and Recognition of Science and Technology). For official FTC
software and support, see the FtcRobotController
repository and FIRST's own resources.
FTC Core is a preview, but the core workflow works: setting up the tools, writing code with
IntelliSense, building, and deploying to a Control Hub over Wi-Fi, including Sloth hot reload. The
lists below say what has been tested on real hardware and what hasn't yet.
What works today
Tested with real tools on macOS (Apple Silicon), FTC SDK 12.0 and a Control Hub (OS 1.1.6):
- Setting up the tools a build needs. FTC Core finds the JDK and Android SDK you already have and
installs only what's missing (Eclipse Temurin JDK 17, Android platform, build-tools and
platform-tools) into its own folder. You accept each license yourself, and it doesn't change
PATH, JAVA_HOME or ANDROID_HOME. You don't need Android Studio.
- Java IntelliSense for TeamCode: completion, imports, Javadoc on hover from the real FTC SDK sources,
go to definition, find references and compiler errors.
- Building the robot app with the project's own Gradle wrapper, with compile errors in the Problems
panel.
- Creating a new project from an official FTC SDK release, with starter OpModes and, if you want them,
Sloth hot reload and libraries.
- Deploying to a Control Hub over Wi-Fi. A hardware test deployed 19 different projects (every
template and library set, with and without Sloth) using the same build and install steps as Run
on Robot. Every install arrived on the robot, and the app started in 18 of the 19.
- Sloth hot reload: 16 of 16 hot reloads loaded on the robot and were confirmed in the robot log, and
Remove Sloth Remote cleaned up every time.
- Working without internet. All of those deployments ran with the computer connected only to the
robot's Wi-Fi, after preparing each project online.
- Connecting to a Control Hub over Wi-Fi automatically, recognizing it, and streaming the Robot
Controller log into VS Code.
- Adding, updating and removing libraries (Sloth, Pedro Pathing, Road Runner, SolversLib, FTC
Dashboard, Panels and others). You see every Gradle change before it's made, and the old files are
backed up. The newest version of every library in the catalog has been built with FTC SDK 12.0.
- Warnings about library versions with known bugs, before they reach the robot. The first one recorded
is a crash in Pedro Pathing's AutoTune 1.0.2.
Known problems
- Panels together with the Sloth build of FTC Dashboard (tested alongside Pedro Pathing and SolversLib)
crashes the Robot Controller app on start-up: two of the libraries' web servers want the same port.
Each of them works on its own.
- With Pedro Pathing, the Robot Controller app takes about 25 seconds to start, and Android may log an
"app not responding" warning while it does. The app recovers.
Built, but not yet confirmed on a robot
These are written and tested against simulated devices, but nobody has confirmed them on real hardware
yet. They may well work for you. If something goes wrong, please
open an issue.
- USB connections, phone Robot Controllers, wireless pairing on Android 11 and newer, and sharing ADB
with Android Studio.
- Fetching robot configurations to check hardware names in your code.
- Updating an existing project to a newer FTC SDK release.
- Opening FTC Dashboard, Panels, scrcpy and the REV Hardware Client from VS Code.
Not supported yet
- Windows, Linux and Intel Macs haven't been tested beyond unit tests on Linux. FTC Core is built to
run on them, but expect problems.
- The debugger is experimental, off by default, and hasn't been tried on a robot.
- IntelliSense doesn't analyze Kotlin code in TeamCode.
- VSCodium with the Java extension from Open VSX hasn't been tested.
- Older library versions in the catalog come from each library's own documentation and haven't been
built by FTC Core.
- Blocks and OnBot Java aren't part of FTC Core; it works with Android Studio style projects only.
docs/STATUS.md has the full list of what has been tested, and how.
Install
Install the FTC Extension Pack from the Visual Studio Marketplace, or from Open VSX in VSCodium. It
installs FTC Core together with Language Support for Java and Debugger for Java. Then open an FTC
project folder and follow the quick start.
To try a development build, run npm install && npm run package and install the .vsix file with
Extensions: Install from VSIX…, plus Language Support for Java (redhat.java) and Debugger for
Java (vscjava.vscode-java-debug).
You can keep using Android Studio on the same project. FTC Core uses the same Gradle build and doesn't
change the project's structure.
Documentation
Privacy
FTC Core collects no analytics and sends no usage data. It downloads tools only from Eclipse Adoptium,
Google's Android repository, GitHub and Gradle. While an FTC project is open, it also downloads the
library catalog from GitHub once a day; ftc.libraries.refreshCatalog turns that off.
Development
npm install
npm run check # typecheck, formatting, unit tests, catalog validation
npm run test:integration # extension-host tests in VS Code (downloads VS Code)
npm run build # bundle to dist/
Press F5 in VS Code to start an Extension Development Host. See
docs/contributing.md for the rest.
License
FTC Core is source-available under the PolyForm Strict License 1.0.0. You can read the
code and use the extension for noncommercial purposes, which covers students, schools and nonprofit
teams. The license doesn't allow copying, changing or redistributing the code, or using it in other
projects. To send changes to this repository, see the
contribution terms. The extension package includes
ThirdPartyNotices.txt with the licenses of the bundled npm packages.