The FRC Installer for VS Code comes with a bundled Java 17 OpenJDK runtime. The correct version of VS Cole is downloaded by the installer and installed and configured automatically.
The current installer release for 2024 is WPILib 2024.1.1
The FRC Installer is found on the wpiLib site.
If you want to disable the collection of usage data by Microsoft:
Start Visual Studio Code
File -> Preferences -> Settings and then search for "Telemetry"
Adjust your settings based on your preference
This is a pretty wise thing to do, you can always update VS Code manually should you choose to do so, but having VS Code update itself automatically may not be what you want on the night before a tournament:
Start Visual Studio Code
Open File -> Preferences -> Settings
Search for "update mode"
Set the update mode to "none"
NOTE: An internet connection is required to download components of the build!
Create a sample project in VS Code:
start VS Code
click the wpilib icon in the banner upper right. This will open a WPILib menu.
select WPILib: Create a new project
use the dialog menu to create a new project
... select: template, java, Command Robot
and enter a Base Folder, Project Name, and Team Number and click Generate Project.
A pop-up will ask whether to open the project in the current window or a new window. Choose Current Window.
the project should start to build automatically. To build the project manually, right click the build.gradle component in the project explorer, and select Build Robot Code. This will take a few minutes the first time a gradle project is built as additional components are downloaded!
WPILib provides detailed instructions on installing VS Code and Creating a WPILib project in VS Code using the Command Framework.