These 2 weeks I have been looking for and fixing this issue.
Recently my antivirus got updated... I am using Bitdefender and until this release I have never had problems with it. So one day when I had some time I decided to start working on my issue.
In my case the first step was reproducing the bug. So I tried to run vs code and I run into this error:
[21:02:51] Using gulpfile C:\...\gulpfile.js
[21:02:51] Starting 'clean-electron'...
[21:02:51] Finished 'clean-electron' after 6.22 ms
[21:02:51] Starting 'electron'...
↓ electron-v1.7.9-win32-x64.zip [==============------] 68%events.js:183
throw er; // Unhandled 'error' event
Error: read ECONNRESET
at _errnoException (util.js:1024:11)
at TLSWrap.onread (net.js:615:25)
[21:08:18] Syncronizing built-in extensions...
[21:08:18] You can manage built-in extensions with the --builtin flag
[21:08:18] [marketplace] email@example.com ✔︎
[21:08:18] [marketplace] firstname.lastname@example.org ✔︎
'".build\electron\Code - OSS.exe"' is not recognized as an internal or external command,
operable program or batch file.
So after a few hours of research on StackOverflow, I wasn't getting anywhere. It was a lucky coincidence and I decided to check my antivirus.
It always gives me million notifications about what is happening in the system, but not this time... My Bitdefender just silently blocked executables needed to run VS code.
It took me a while to disable blocking of all the files I needed to run, but I finally managed to restore all the files and finally run my instance of Visual Studio code.
Tip for future: if something goes wrong and you don't have an explanation, check your overprotective antivirus.