Visual Studio Code “Error while fetching extensions. XHR failed”

I had the same problem, I did the following steps to solve it

All you need to do is enter to the JSON settings file from VSC

1. Press F1
2. Type User Settings
3. Search for Proxy
4. In proxy section, look for the title `Http: Proxy Authorization`
5. Click on 'Edit in settings.json'
6. Delete all brackets containing proxy data
7. Save JSON file

After that, just restart VSC
You can also find the JSON in %appdata%/Code/User/settings.json

Leave a Comment