Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. With the GitHub Classroom extension for Visual Studio Code, students can easily browse, edit, submit, collaborate, and test their Classroom Assignments. For more information about IDEs and GitHub Classroom, see "Integrate GitHub Classroom with an IDE."
The GitHub Classroom integration with Visual Studio Code provides students with an extension pack which contains:
- GitHub Classroom Extension with custom abstractions that make it easy for students to navigate getting started.
- Visual Studio Live Share Extension integrating into a student view for easy access to teaching assistants and classmates for help and collaboration.
- GitHub Pull Request Extension allowing students to see feedback from their instructors within the editor.
When creating an assignment, Visual Studio Code can be added as the preferred editor for an assignment. For more details, see "Integrate GitHub Classroom with an IDE."
This will include an "Open in Visual Studio Code" badge in all student repositories. This badge handles installing Visual Studio Code, the Classroom extension pack, and opening to the active assignment with one click.
Note: The student must have Git installed on their computer to push code from Visual Studio Code to their repository. This is not automatically installed when clicking the Open in Visual Studio Code button. The student can download Git from here.
The GitHub Classroom extension has two major components: the 'Classrooms' view and the 'Active Assignment' view.
When the student launches the extension for the first time, they are automatically navigated to the Explorer tab in Visual Studio Code, where they can see the "Active Assignment" view alongside the tree-view of files in the repository.
The student can push their commits to the latest version of remote, by clicking the sync changes button, displayed when hovering over the "Active Assignment" line. This abstracts away source control with Git, allowing instructors to teach Git at their own pace. Synching changes also triggers "Tests" to run if a teacher has configured autograding for their assignment.
The "Group" node under "Active Assignment" will show members of a group, if the assignment is a group project. It will also show the admin members of the repository who can help when a student is stuck. To collaborate on the project, a student can start a Live Share session with anyone in the group node, and they will immediately share the entire context of the repository with them. You can learn more about Live Share and collaborating with it here.
Once a student is done with the assignment, they can also navigate to see other Assignments and Classrooms. These can be found under the GitHub tab.