VS Code causes 17.10, 18.04 randomly and completely freeze

So it turns out that this isn't specific to Ubuntu, but I'll post this here anyways for future reference.

Apparently, even though I'm ignoring certain files using the files.exclude setting (notably the ./node_modules directory), VS Code still watches those files for changes.

To solve that, simply copy the list from files.exclude to files.watcherExclude. This will prevent VS Code from searching the many thousands of files that are in node_modules or other similar directories. That way, it will leave some RAM for Chrome to gobble up.


I got the same issue in my Ubuntu 16.04.

I did switch off git.autorefresh in the Settings, then it works flawlessly and smoothly


I just ran into this. Upon launch, in a big project, my system would freeze after ~20 seconds and become unresponsive (Ubuntu 18.04). Running htop while launching VSCode showed that it took all the cores to 100% (i7-8700K), ate all the memory (16gb) and then the swap. The freeze happened moments later. This was happening because of a bad extension, in my case it was CSS Peek.

So try launching vscode with extensions disabled (code --disable-extensions) and see if it still happens. If it doesn't track down the faulty extension and send it to hell.

I had random full freezes happening and spent quite a few hours trying to find out why. On restart the logs were really not helpful. I initially thought it was the nvidia driver, but no - just a VSCode extension.