Documentation
Topics Overview Overview Linux macOS Windows VS Code for the Web Raspberry Pi Network Additional Components Uninstall VS Code Tutorial Copilot Quickstart User Interface Personalize VS Code Install Extensions Tips and Tricks Intro Videos Overview Setup Quickstart Overview Language Models Context Tools Agents Customization Trust & Safety Overview Agents Tutorial Agents Window Planning Memory Tools Subagents Local Agents Copilot CLI Cloud Agents Third-Party Agents Overview Chat Sessions Add Context Inline Chat Review Edits Checkpoints Artifacts Panel Debug Chat Interactions Prompt Examples Overview Instructions Prompt Files Custom Agents Agent Skills Language Models MCP Hooks Plugins Context Engineering Customize AI Test-Driven Development Edit Notebooks with AI Test with AI Test Web Apps with Browser Tools Debug with AI MCP Dev Guide OpenTelemetry Monitoring Inline Suggestions Smart Actions Best Practices Security Troubleshooting FAQ Cheat Sheet Settings Reference MCP Configuration Workspace Context Display Language Layout Keyboard Shortcuts Settings Settings Sync Extension Marketplace Extension Runtime Security Themes Profiles Overview Voice Interactions Command Line Interface Telemetry Basic Editing IntelliSense Code Navigation Refactoring Snippets Overview Multi-Root Workspaces Workspace Trust Tasks Debugging Debug Configuration Testing Port Forwarding Integrated Browser Overview Quickstart Staging & Committing Branches & Worktrees Repositories & Remotes Merge Conflicts Collaborate on GitHub Troubleshooting FAQ Getting Started Tutorial Terminal Basics Terminal Profiles Shell Integration Appearance Advanced Overview Enterprise Policies AI Settings Extensions Telemetry Updates Overview JavaScript JSON HTML Emmet CSS, SCSS and Less TypeScript Markdown PowerShell C++ Java PHP Python Julia R Ruby Rust Go T-SQL C# .NET Swift Working with JavaScript Node.js Tutorial Node.js Debugging Deploy Node.js Apps Browser Debugging Angular Tutorial React Tutorial Vue Tutorial Debugging Recipes Performance Profiling Extensions Tutorial Transpiling Editing Refactoring Debugging Quick Start Tutorial Run Python Code Editing Linting Formatting Debugging Environments Testing Python Interactive Django Tutorial FastAPI Tutorial Flask Tutorial Create Containers Deploy Python Apps Python in the Web Settings Reference Getting Started Navigate and Edit Refactoring Formatting and Linting Project Management Build Tools Run and Debug Testing Spring Boot Modernizing Java Apps Application Servers Deploy Java Apps GUI Applications Extensions FAQ Intro Videos GCC on Linux GCC on Windows GCC on Windows Subsystem for Linux Clang on macOS Microsoft C++ on Windows Build with CMake CMake Tools on Linux CMake Quick Start C++ Dev Tools for Copilot Editing and Navigating Debugging Configure Debugging Refactoring Settings Reference Configure IntelliSense Configure IntelliSense for Cross-Compiling FAQ Intro Videos Get Started Navigate and Edit IntelliCode Refactoring Formatting and Linting Project Management Build Tools Package Management Run and Debug Testing FAQ Overview Node.js Python ASP.NET Core Debug Docker Compose Registries Deploy to Azure Choose a Dev Environment Customize Develop with Kubernetes Tips and Tricks Overview Jupyter Notebooks Data Science Tutorial Python Interactive Data Wrangler Quick Start Data Wrangler PyTorch Support Azure Machine Learning Manage Jupyter Kernels Jupyter Notebooks on the Web Data Science in Microsoft Fabric Foundry Toolkit Overview Foundry Toolkit Copilot Tools Create Agents Models Playground Agent Builder Agent Inspector Evaluation Tool Catalog Fine-Tuning (Automated Setup) Fine-Tuning (Project Template) Model Conversion Tracing Profiling (Windows ML) FAQ File Structure Manual Model Conversion Manual Model Conversion on GPU Setup Environment Without Foundry Toolkit Template Project Migrating from Visualizer to Agent Inspector Overview Getting Started Resources View Deployment VS Code for the Web - Azure Containers Azure Kubernetes Service Kubernetes MongoDB Remote Debugging for Node.js Overview SSH Dev Containers Windows Subsystem for Linux GitHub Codespaces VS Code Server Tunnels SSH Tutorial WSL Tutorial Tips and Tricks FAQ Overview Tutorial Attach to Container Create Dev Container Advanced Containers devcontainer.json Dev Container CLI Tips and Tricks FAQ Default Keyboard Shortcuts Default Settings Substitution Variables Tasks SchemaOn this page there are 6 sections
Try this
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.
Follow these steps to get started with Copilot in VS Code:
-
Hover over the Copilot icon in the Status Bar and select Use AI Features.
-
Choose a sign-in method and follow the prompts.
-
If you already have a Copilot subscription for your account, VS Code will use that subscription.
-
If you don't have a Copilot subscription yet, you'll be signed up for the Copilot Free plan and get a monthly limit of inline suggestions and chat interactions. Learn more about the different GitHub Copilot plans.
ImportantStarting April 20, 2026, new sign-ups for Copilot Pro, Copilot Pro+, and student plans are temporarily paused. Additionally, we are tightening weekly usage limits. See GitHub Copilot usage limits.
-
-
Start using Copilot in VS Code!
Learn the basics with the Copilot Quickstart.
-
Type /init in a chat session to set up your project for AI.
The /init command analyzes your codebase and creates custom instructions to help the AI generate code that matches your coding practices.
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 This setting is managed at the organization level. Contact your administrator to change it. to off, or you can adjust both telemetry and code suggestion settings in Copilot Settings.
Use Copilot with a GHE account
If your Copilot subscription is associated with a GitHub Enterprise (GHE) account, you can sign in to Copilot in VS Code with your GHE credentials.
-
If you haven't already, hover over the Copilot icon in the Status Bar and select Use AI Features.
-
In the sign in dialog, choose Continue with GHE.com and provide your GHE instance URL and credentials.
If you need to switch between a GitHub.com account and a GHE account, see Use a different GitHub account per workspace or profile for instructions.
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.
-
Select the Accounts menu in the Activity Bar, and then select Sign out for the account you're currently signed in with.
-
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.
-
Select the Accounts menu in the Activity Bar, and then select 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)).
-
Use a different GitHub account per workspace or profile
You can use different GitHub accounts for Copilot per VS Code workspace or profile. This is useful if you use Copilot with different accounts for work and personal projects, or if you want to use different accounts for different extensions that use GitHub authentication.
Follow these steps to configure which GitHub account to use for Copilot. This configuration is saved per workspace and per profile.
-
For GitHub.com accounts:
- In the Accounts menu in the Activity Bar, select Manage Extension Account Preferences
- Select GitHub Copilot Chat from the list of extensions
- Choose the GitHub account you want to use for Copilot in the current workspace and profile
-
For GHE.com accounts:
TipIf you only want to use a GHE account for Copilot, follow the steps in Use Copilot with a GHE account to sign in with your GHE account.
-
Run Preferences: Open User Settings (JSON) or Preferences: Open Workspace Settings (JSON) from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P))
-
Add the following setting to specify GitHub Enterprise as the authentication provider for Copilot:
-