Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Metawhy/e2fc6f833d074c2e6a733310a07e65e2 to your computer and use it in GitHub Desktop.
Save Metawhy/e2fc6f833d074c2e6a733310a07e65e2 to your computer and use it in GitHub Desktop.
A comprehensive list of working solutions found online to solve freezes within Microsoft Visual Studio Code !

All known working methods to prevent VSCode Freezes

Microsoft Visual Studio Code freezes can be extremely frustrating. I experienced it and spent hours looking for solutions.

The result is this comprehensive list of every solution I found to solve the freezing VSCode problem!

There can be multiple origins to the freeze, so I suggest that you try multiple of these solutions until the problem disappears.

Each worked for at least 1 person, and there is a link to the source for each. Hoping that it will solve your problem!

You found another working solution? Please share it with others here!


Close programs that might interact your workspace's files

VSCode regularly accesses your files. So if you have other programs that access to your files at the same time, it might cause issues.

Watch for :

  • Google Drive / iCloud & others cloud sync services. They can try to synchronize your files when you have VSCode open. Source
  • External auto code compilers/minifyers
  • Other IDEs (like one from Jetbrains).
  • Any file editor with one of your workspace's files opened.
  • Windows Defender : you can add an exclusion to tell it to stop scanning your workspace's folder. It is recommended for similar IDEs. Source

Be sure to disable them when you use VSCode.


Disable useless or seemingly conflicting extensions

Often time, an extension is the root cause.

Try to figure out if 2 extensions are :

  • using the same files (Example : 2 extensions that compile the same file)
  • linting/formatting/making suggestions for the same language (2 CSS "suggestion extensions for example)

Specific extensions linked to freezes : TSLint Source, PHP IntelliSense Source, IntelliCode [Source : was causing freezes for me]

Finally you can try to disable all extensions, and re-activate them one-by-one to identify the ones that are probably linked to the freezes.


Known-to-help settings changes

Changing specific settings seems to remove the freezes :

  1. Git autorefresh

Go in File > Preference > Settings

Type Git autorefresh in the search bar

And disable it. Source

You can still use git, you simply have to click the "refresh arrow" in the git panel to update the file list.

  1. Terminal Integrated Renderer

Go in File > Preference > Settings

Type terminal.integrated.rendererType in the search bar

And set it to dom. Source

  1. It may also help to disable the Autosave setting in the File menu :

Screenshot of the location of Autosave

This removes the very practical Autosaves. You will have to save CTRL/CMD + S after you modify files.


Free up VSCode detection watcher

Two ways to do this :

  1. Empty your folder of unused files and folder

This is because VScode watches constantly all your files for modifications. It can take up much RAM & this might be the source of Freezes.

  1. Or add exceptions to the VSCode File Watchers

Go in File > Preference > Settings

Type files.watcherExclude in the search bar

Add a line and enter Globbing patterns (the same language as the .gitignore file! Quicksheet here) to exclude specific files or folders.

Once you are finished, copy them, type files.exclude in the search bar

And add the same lines there!

As an example, I use this list for both :

**/.git
**/.svn
**/.hg
**/CVS
**/.DS_Store
**/node_modules
**/.firebase
**/.git/objects/**
**/.git/subtree-cache/**
**/node_modules/**

This ignores files that are commonly not useful to watch.


Disable VSCode use of the GPU

This has been reported to work, but can be trickier.

On windows the simplest & most durable way to do this is to modify the target of the VSCode shortcut (here's how to do this)

And add --disable-gpu at the end of the line. Make sure you have 1 space between the last character of the shortcut and the --. Source

If you start VSCode from the commandline you can use : code --disable-gpu


Disable Hardware acceleration of web browsers

If the issue is happening when you use Chrome, look into Chrome's settings:

Go in Preferences > Advanced> System

And turn off Use hardware acceleration when available Source 1, 2

As Firefox and other browser can use GPU as well, you might as well disable it too.

  • Other browsers : Many browsers are based on Chrome so you can try the directions above. Else search for your browser.
  • Guide for firefox

Clear some RAM for VSCode

VSCode freezes are often linked to limited RAM.

Make sure to close :

  • Unused programs
  • Unused tabs in web browsers
  • RAM-hungry softwares (video games, video editing other IDEs)

To clear RAM for VSCode and see if it solves the problem.

As a final world you can also limit the opened tabs in VSCode to salvage some more RAM.


Use proprietary GPU Drivers

If you use the "Nouveau" Nvidia GPU Driver, it seems like switching back to proprietary driver can solve the problem. Source


Update NVidia Drivers

Has also helped people solve the problem. Source


Uninstall Git for Windows & reinstall/update Git

It can also solve the problem as Git for Windows seems to consume much more RAM than plain Git. Source


Reinstall VSCode

As a last resort, you can uninstalled VSCode and reinstall it, best without any extension. Source


Make sure you meet the requirements to run VSCode

VSCode is not a entireley lightweight. Here are its requirements

Minimum : 1.6 GHz processor, 1GB of RAM and 200 MB disk space.

My estimate to ensure a smooth running experience : 3.5 GHz processor, 8 GB RAM and 1 000 MB disk space.

If your computer does not meet its requirements it might be best to switch to another code editor or upgrade your PC. Source


If VSCode freezes only when you delete a file/folder

See here


Still freezing ? A last resort solution

If you have many files (1000+), sometimes disabling git.autorefresh is not enough. Source 1, 2

If you already tried everything above and VSCode still freezes :

Go in File > Preference > Settings

Type git.enabled in the search bar

And disable it.

Unfortunately this removes the very practical & useful Git integration in VSCode. But if it allows you to work it can be worth it.



I hope your VSCode is now running smoothly ! 😊

You found another working solution? Please share it here to help others !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment