Sub topic 13
Troubleshoot common setup problems
This chapter assumes you have a GitHub account, can open the Extensions view and the Command Palette in VS Code, and have already tried to install the Copilot extension and sign in. It gives you a fixed order of checks for the three most common failures: sign-in problems, missing suggestions, and network problems.
Work from the outside in
Most setup problems come from one of a few layers. Check them in order, from the account down to the editor. That way you don't change settings that were never the cause.
Check the status icon first
The Copilot icon in the VS Code status bar, at the bottom right, shows the current state. Select it to see a menu with the status and the settings that apply to the current file.
- A normal icon means Copilot is active.
- A crossed-out or disabled icon means Copilot is turned off for this file or language.
- A warning or error icon means a problem with your account, the service, or the network. Hover over it for the message.
Sign-in failures
If sign-in fails or loops, check these causes in order:
- Wrong account. Open the Accounts menu in the lower left of the Activity Bar. Confirm the signed-in GitHub account is the one that has Copilot access. If you have a personal and a work account, this is the most common cause.
- No active plan. Check your plan on GitHub. If your access comes from an organization, an administrator must assign you a seat.
- Stale session. Sign out from the Accounts menu, then run Developer: Reload Window from the Command Palette and sign in again.
- Browser handoff. Sign-in opens a browser and returns to VS Code. If the browser blocks the redirect, allow VS Code to open the link when asked.
Suggestions do not appear
When you are signed in but see no inline suggestions, look at the file and its settings.
- Language disabled. Open
settings.jsonand look atgithub.copilot.enable. A language set tofalse, such asmarkdownorplaintext, gets no suggestions. - Content exclusion. If an administrator excluded the file or repository, Copilot won't use it. The status icon usually says so.
- Wrong context for a trigger. Inline suggestions respond to code and comments. Try a comment and a signature, as in the example below.
- Another extension. Other completion extensions can compete for the same shortcut. Disable them temporarily to test.
# Return the n-th Fibonacci number using iteration
def fibonacci(n):After typing the signature, wait a moment. A grey suggestion should appear. Press Tab to accept it. If nothing appears here, the cause is account, network, or settings, not your prompt.
Network and proxy problems
Copilot talks to GitHub services over HTTPS. Corporate proxies and firewalls often block that traffic or change its certificates.
- Set the proxy in VS Code with the
http.proxysetting, or through your system proxy settings. - If your network uses a custom certificate authority, make sure the operating system trusts it.
- Ask your network team to allow the GitHub and Copilot hosts listed in the GitHub documentation for your plan.
Read the logs
If the earlier checks find nothing, open the Output panel and choose GitHub Copilot or GitHub Copilot Chat from the dropdown. Look for lines that mention authentication, 401 or 403 responses, certificate errors, or timeouts. Each points to a layer from the flowchart: account, access, certificates, or network.
Summary table
| Symptom | Likely cause | First action |
|---|---|---|
| Sign-in loops | Wrong account or stale session | Sign out, reload the window, sign in again |
| "No access" message | No plan or seat | Check your plan or ask your administrator |
| No suggestions in one file type | Language disabled | Check `github.copilot.enable` |
| No suggestions anywhere | Network or account | Check the status icon and logs |
| Certificate or timeout errors | Proxy or firewall | Configure the proxy and trusted certificates |
Exercise
You are signed in, the status icon looks normal, and suggestions work in Python files but never in Markdown files. Which setting do you check first, and what value do you expect to find?
Show answer
Check github.copilot.enable in settings.json. You expect to find "markdown": false, which turns off inline suggestions for Markdown. Set it to true to turn them back on.
Exercise
Sign-in succeeds, but the Copilot Chat Output log shows repeated certificate errors on a company laptop. Which layer is the likely cause, and what is one fix?
Show answer
The network layer, most likely a proxy that replaces certificates. Fix it by making the operating system trust the company certificate authority, or by setting http.proxy correctly, and then reloading the window.