Join a near you to learn about AI-assisted development in VS Code.

Set up GitHub Copilot in VS Code

This guide walks you through setting up GitHub Copilot in Visual Studio Code. To use Copilot in VS Code, you need to have access to GitHub Copilot with your GitHub account.

Tip

If you don't yet have a Copilot subscription, you can use Copilot for free by signing up for the Copilot Free plan and get a monthly limit of completions and chat interactions.

Get access to GitHub Copilot

There are different ways to get access to GitHub Copilot:

Type of User Description
Individual
Organization/Enterprise member

Set up Copilot in VS Code

To use Copilot in VS Code, you need access to a GitHub Copilot subscription. You can set up Copilot directly from within VS Code.

  1. Hover over the Copilot icon in the Status Bar and select Set up Copilot.

    Hover over the Copilot icon in the Status Bar and select Set up Copilot.

  2. Choose a sign-in method and follow the prompts. If you don't have a Copilot subscription yet, you'll be signed up for the Copilot Free plan.

    Sign in to your GitHub account or use Copilot if you're already signed in.

    Important

    Telemetry in your free version of GitHub Copilot is currently enabled. By default, code suggestions that match public code, including code references in the VS Code and <github.com> experience, are allowed. You can opt out of telemetry data collection by disabling telemetry in VS Code by setting telemetry.telemetryLevel to off, or you can adjust both telemetry and code suggestion settings in Copilot Settings.

  3. You can now start using Copilot in VS Code. Learn the basics with the Copilot Quickstart.

Use a different GitHub account with Copilot

If your Copilot subscription is associated with another GitHub account, follow these steps to sign out of your GitHub account in VS Code, and sign in with another account.

  1. Select the Accounts menu in the Activity Bar, and then select Sign out for the account you're currently signed in with.

    Accounts menu in VS Code, showing the option to sign out of the current GitHub account.

  2. Sign in to your GitHub account using any of the following methods:

    • Select Sign in to use Copilot from the Copilot menu in the Status Bar.

      Sign in to use Copilot from the Copilot status menu.

    • Select the Accounts menu in the Activity Bar, and then select Sign in with GitHub to use GitHub Copilot.

      Accounts menu in VS Code, showing the option to sign in with GitHub to use GitHub Copilot.

    • Run the GitHub Copilot: Sign in command in the Command Palette (โ‡งโŒ˜P (Windows, Linux Ctrl+Shift+P)).

Remove AI features from VS Code

You can disable the built-in AI features in VS Code with the chat.disableAIFeatures setting, similar to how you configure other features in VS Code. This disables and hides features like chat or inline suggestions in VS Code and disables the Copilot extensions. You can configure the setting at the workspace or user level.

Alternatively, use the Learn How to Hide AI Features action from the Chat menu in the title bar to access the setting.

Note

If you have previously disabled the built-in AI features, your choice is respected upon updating to a new version of VS Code.

Disable AI features for a workspace

To disable AI features for a specific workspace, configure the chat.disableAIFeatures setting in workspace settings. This setting is available in the Settings editor (โŒ˜, (Windows, Linux Ctrl+,)), or you can edit the settings.json file in the workspace.

Next steps