Sub topic 1
What Copilot Does in VS Code
Prerequisites
Assume that you can open a folder in Visual Studio Code, use the Extensions view and Command Palette, edit code, and access a GitHub account.
What Copilot Does in VS Code
GitHub Copilot is an AI coding assistant integrated into Visual Studio Code. It uses the code near your cursor, open files, and your request to generate suggestions. Inline suggestions appear as faded text while you type. Copilot Chat answers questions and can suggest changes, but you remain responsible for reviewing, testing, and accepting its output.
A typical flow looks like this:
Copilot can generate useful boilerplate and explain unfamiliar code. It can also produce incorrect, insecure, or unsuitable code. Treat every suggestion as a draft. Check its logic, dependencies, error handling, and tests.
Check Your Plan and Access
Copilot access depends on the GitHub account and plan you use. GitHub offers individual plans, including a limited Free option and paid plans such as Pro. Organizations can provide Copilot through Business or Enterprise plans.
| Account situation | What to check |
|---|---|
| Personal account | Confirm that Copilot is enabled for the account or subscription |
| Organization account | Confirm that an administrator assigned access and allowed Copilot for your organization |
If your organization manages your account, its policies can restrict Copilot features even when the extension is installed.
Install the Extension
- Open VS Code and select the Extensions view.
- Search for GitHub Copilot.
- Select the extension published by GitHub and choose Install.
- Reload VS Code if it asks you to do so.
The extension adds inline completion and chat commands to VS Code. Installation alone does not grant access. You must sign in with an account that has Copilot access.
Sign In With GitHub
After installation, select the Accounts icon in VS Code and choose the GitHub sign-in option. A browser window opens. Authorize VS Code, then return to the editor. You can also use the Command Palette and run a GitHub Copilot sign-in command if VS Code displays one.
Exercise
Why might Copilot remain unavailable after you install its extension?
Show answer
The signed-in GitHub account may lack Copilot access, or an organization policy may disable it.