The WPILib command palette
Everything FRC-specific in VS Code lives behind the red "W" icon in the top-right corner (or press Ctrl+Shift+P and type "WPILib"). This opens the WPILib command palette.
Creating a new project
- Open the command palette → "Create a new project."
- Choose a project type: Template (bare base classes) or Example (working sample code). Importing an existing Gradle project is a separate command, not a choice here.
- Choose your language (Java/C++).
- Pick a base class — for beginners, start with Timed Skeleton or the Command Robot template.
- Set a folder, project name, and your team number.
The extension generates a Gradle project: source under src/main/java/..., a build.gradle, and a vendordeps/ folder for vendor libraries.
Building robot code
Use the command palette → "Build Robot Code" (or the shortcut menu in the top-right). Gradle compiles your code and reports errors. Building does not require a robot — you can build anywhere. Always build before a competition to catch compile errors early.
Deploying to the roboRIO
With the roboRIO powered and connected (USB, Ethernet, or robot radio), use "Deploy Robot Code." This:
- Builds the code if needed.
- Copies the program to the roboRIO.
- Restarts the robot program so your new code runs.
The Deploy console (the RioLog) shows progress and runtime System.out / print output, which is your first-line debugging tool.
Critical warning: Never power off the robot while deploying. Interrupting a deploy can corrupt the roboRIO filesystem, forcing a re-image.
Vendor libraries (vendordeps)
Motor-controller vendors ship their own libraries (CTRE Phoenix 6, REVLib, PathPlannerLib, ChoreoLib, etc.). Install them via the command palette → "Manage Vendor Libraries" → "Install new libraries (online)" and paste the vendor's JSON URL, or "offline" if the installer placed them locally. Each adds a file in vendordeps/. You'll do this in Module 3.
A typical first session
- Create a Command Robot project with your team number.
- Build it (should succeed with no edits).
- Connect to the roboRIO and deploy.
- Open the Driver Station, enable Teleop, and confirm the program is running (the Driver Station shows "Communications," "Robot Code," and "Joysticks" indicators green).
If all three indicators are green, your toolchain is fully working and you're ready to write real code.
Key takeaways
- The red 'W' icon opens all WPILib commands in VS Code.
- Create projects from Template or Example; Command Robot is a great starting point.
- Build works anywhere; Deploy requires a connected roboRIO and restarts the robot program.
- Never power off during a deploy — it can corrupt the roboRIO.
- Vendor libraries are added through 'Manage Vendor Libraries' and land in vendordeps/.
Go deeper
Lesson quiz
RequiredAnswer all 3 questions correctly to complete this lesson.
01.What is the standard way to run WPILib commands inside VS Code?
02.Which command builds your project and sends the compiled program to the roboRIO?
03.What happens if you power off the robot in the middle of a deploy?
Answer every question to submit.
All 51 lessons in Programming, Controls & Sensors
- Not started:Mini-Project: A Closed-Loop Elevator with Motion Magic
- Not started:Mini-Project: A Velocity-Controlled Shooter on REVLib
- Not started:Mini-Project: A Teleop Swerve Drive Subsystem
- Not started:Mini-Project: An Autonomous Routine with PathPlanner
- Not started:Mini-Project: Vision-Aligned Scoring with Limelight
- Not started:State-Space Control and Kalman Filtering
- Not started:Log Replay Architecture with AdvantageKit
- Not started:Advanced Pose Estimation: Multi-Tag Fusion and Standard Deviations
- Not started:Robot Coordination, Alerts, and Operator Feedback
- Not started:Case Study: Hardening Software Before an Event