Sub topic 13
Troubleshoot common setup problems
This chapter covers the first things to check when GitHub Copilot does not work in Visual Studio Code. It assumes you can open the Command Palette and the Extensions view, you have a GitHub account, and you have already tried to install the extension and sign in. It follows the concept graph for this tutorial: sign-in problems and settings problems are the two main sources of failures, so they are covered first.
A method for diagnosing problems
Most Copilot failures fall into one of five groups. Work through them in order, because each group depends on the one before it.
- Account and plan. Your GitHub account has no active Copilot access.
- Extension and sign-in. The extension is missing, disabled, outdated, or not signed in.
- Settings and scope. Copilot is turned off for the language, the workspace, or the current file.
- Network. A proxy, firewall, or certificate blocks the connection to GitHub.
- Policy and exclusions. An organization policy or a content exclusion rule stops Copilot for this repository or file.
Check the status icon first
The Copilot icon in the VS Code status bar (bottom right) is the fastest signal. Select it to open a menu that shows the current state.
| What you see | What it usually means | What to do |
|---|---|---|
| Icon with a normal appearance | Copilot is active | Test a suggestion in a code file |
| Icon with a slash or "disabled" state | Completions are off for this language or globally | Check `github.copilot.enable` |
| Icon with a warning or error mark | Sign-in, quota, or network problem | Open the menu and read the message |
| No Copilot icon at all | The extension is not installed or is disabled | Check the Extensions view |
The menu also lets you turn completions on or off for the current language, which is the quickest way to test whether a setting is the cause.
Sign-in failures
Sign-in problems are the most common cause of a silent Copilot. Check these in order.
The account has no Copilot access
Signing in to GitHub does not give you Copilot. The account needs an active plan, such as a free plan, an individual subscription, or a seat from an organization or enterprise. If you are on a work account, the seat may have been assigned to a different GitHub username than the one you signed in with.
To verify, open your GitHub account settings in a browser and look for Copilot. If the page shows no active plan, the problem is access, not VS Code.
You are signed in with the wrong account
VS Code can hold more than one GitHub account. If Copilot uses a personal account that has no plan, while your licensed account is also signed in, you may see access errors.
- Select the Accounts icon in the lower left of VS Code.
- Check which GitHub account is listed.
- Sign out of the wrong account and sign in with the right one.
- Run Developer: Reload Window from the Command Palette.
The browser authorization does not complete
Sign-in opens a browser tab and returns to VS Code. This can fail if the browser blocks the redirect, if you are using a remote or containerized VS Code session, or if you are signed in to a different GitHub account in the browser.
- Make sure the browser asks to open VS Code and that you allow it.
- If the redirect never arrives, sign out in VS Code and start again from the Accounts menu.
- In a remote session, sign in from the local window, so that the extension in the remote host can reuse the account.
- Check that the browser is signed in to the GitHub account you want. Authorizing the wrong account is easy to miss.
The extension itself
If sign-in looks correct but nothing happens, check the extension.
- Open the Extensions view and search for
GitHub Copilot. - Confirm it says it is enabled, not "Disabled" or "Disabled (Workspace)".
- Look for a Restart Extensions or Reload button and use it if present.
- Update to the latest version. Copilot Chat and Copilot rely on a recent VS Code release, so an old VS Code can also cause missing features.
A common cause of "Chat is missing" is a VS Code version that is too old, or the Chat extension not installed alongside the main one. Updating VS Code and the extensions together usually fixes it.
Suggestions do not appear
The extension is active and you are signed in, but the editor shows no inline suggestions. The cause is usually a setting or a context issue.
Language or file is disabled
The setting github.copilot.enable controls where completions run. The * key applies to all languages, and a language key overrides it.
{
"github.copilot.enable": {
"*": true,
"plaintext": false,
"markdown": false
}
}With this configuration, Copilot suggests code in most files but stays quiet in plaintext and Markdown. If you are testing in a .md or .txt file, you will see nothing, and that is the expected behavior. Test in a real code file first.
Also check these:
- The workspace may have its own
.vscode/settings.jsonthat overrides your user settings. - The file may be very large, or its language may not be detected. Look at the language label in the status bar and change it if it is wrong.
- Inline suggestions in the editor can be turned off in VS Code itself with
editor.inlineSuggest.enabled. This must betrue.
The prompt gives too little to work from
Copilot needs context. In an empty file with no comment or signature, it may offer nothing. Give it something to complete:
# Return the n-th Fibonacci number using iteration
def fibonacci(n):Place the cursor at the end of the signature and wait a moment. If a grey suggestion appears, press Tab to accept it.
Suggestions are blocked by a match filter or exclusion
Two settings outside VS Code can hide suggestions without any error. An account or organization policy may block suggestions that match public code. A content exclusion rule may also exclude the file you are editing. In both cases the editor looks normal, but no suggestion appears for that file. If other files work and one repository does not, suspect an exclusion rule and ask your administrator.
Chat problems
Chat has its own failure modes.
- Chat view does not open. Check that the Copilot Chat extension is installed and enabled, and that VS Code is up to date.
- Agent mode is missing. Agent mode needs a recent VS Code version, and an organization policy can turn it off.
- A file you attached is ignored. Check that the path in
#file:is correct, and that the file is not excluded by a content exclusion rule. - Instructions are not followed. The file must be at
.github/copilot-instructions.mdin the repository root, and the folder you opened in VS Code must be that repository root. If you open a subfolder, the file may not be found.
Explain what #file:utils.ts does and suggest one way to simplify it.If this prompt returns a generic answer that does not mention the contents of utils.ts, the file reference was not resolved. Re-attach the file using the paperclip or # picker and try again.
Network problems
Copilot sends requests to GitHub services over HTTPS. Corporate networks often interfere with this.
Typical symptoms are a spinning status icon, messages about being unable to reach the server, or certificate errors. Check these causes:
- Proxy. Set the
http.proxysetting in VS Code, or set the standard proxy environment variables before starting VS Code. - Firewall allowlist. Your network team may need to allow GitHub Copilot domains. The current list is in the GitHub documentation, so use that source instead of a list remembered from elsewhere.
- TLS inspection. A proxy that replaces certificates can cause certificate errors. The corporate root certificate must be trusted by the system.
- VPN. Disconnect the VPN briefly to see whether it is the cause.
{
"http.proxy": "http://proxy.example.com:8080",
"http.proxyStrictSSL": true
}Keep http.proxyStrictSSL set to true when you can. Setting it to false turns off certificate checks, which exposes your traffic, so treat it only as a short test and not a fix.
Read the logs
When the earlier checks give no answer, the logs say what failed.
- Open the Command Palette.
- Run Developer: Show Logs... and choose the GitHub Copilot entry. You can also open the Output panel and pick the Copilot channel from the drop-down.
- Reproduce the problem and read the newest lines.
Look for authentication errors (401 or 403), rate or quota messages (429), and network errors such as timeouts or certificate failures. Each maps to a group in the method above: 401 and 403 point to sign-in or access, 429 points to quota, and timeouts and certificate errors point to the network.
When you report an issue, include your VS Code version, the extension versions, your operating system, and the relevant log lines. Remove tokens, internal hostnames, and any code you do not want to share before posting.
Common mistakes
- Testing only in Markdown or plaintext files, where Copilot is disabled in the example configuration.
- Assuming that being signed in to GitHub means having Copilot.
- Fixing a proxy problem by turning off certificate checks and leaving it that way.
- Opening a subfolder instead of the repository root, then wondering why custom instructions are ignored.
- Skipping Developer: Reload Window after changing accounts or extensions.
Exercise
Copilot gives inline suggestions in your .py files but never in your README.md. Other teammates see the same behavior. What is the most likely cause, and how would you confirm it?
Show answer
The most likely cause is the github.copilot.enable setting, which has "markdown": false (or the language is otherwise disabled). Confirm by opening the Copilot status bar menu while a Markdown file is active, or by checking settings.json for the markdown key. Set it to true if you want suggestions there.
Exercise
You sign in successfully, but the status icon shows an error and the Copilot log contains a 403 response. Which two groups from the diagnostic method should you check first, and what would you look for in each?
Show answer
Check account and plan first: confirm in your GitHub account settings that the account you signed in with has an active Copilot plan or organization seat, and that it is the same account VS Code is using. Then check extension and sign-in: sign out of any other GitHub account in the Accounts menu, sign in again with the licensed account, and reload the window. A 403 points to an access or authorization problem, such as a missing seat or an unauthorized SAML session, not to the network.
Exercise
Your .github/copilot-instructions.md file exists, but Chat ignores it. Name two things to verify.
Show answer
Verify that the file is at .github/copilot-instructions.md in the repository root, with that exact name. Verify that the folder opened in VS Code is that repository root and not a subfolder. You can also check that the Copilot Chat extension is up to date.