Reputation: 307
So I have been using VS Code for a while now, and as of recently when I start up the program, within a couple minutes, my entire computer freezes. I have attempted re-installing it. I have made sure im on the latest update, and I have not recently installed any extensions in the days leading up to this issue.
It is consistently freezing though. Even after restarting my computer and re-installing the application. I have no clue what could be causing this but I really do enjoy VS Code and would like to not have to swap to something else.
Any help is of course greatly apprecaited. Thanks!
Upvotes: 18
Views: 27468
Reputation: 1702
I had similar issue and it was solved this way: press CTRL+SHIFT+P, then find Preferences Configuration, and add:
"disable-hardware-acceleration": true
Upvotes: 0
Reputation: 11
I think the problem is not with the Visual Studio Code but with the 'Dotnet SDK'. I just installed visual studio code today and it was working fine until I installed the SDK ,after that it just freezes my entire computer and I have to restart. Installing an older version of Dotnet SDK might fix the issue.
Upvotes: 1
Reputation:
What worked for me was to set the maximum amount of memory that VS Code can use with the --max-memory
flag. I launch it from bash, so I put the following in my '.bashrc' file.
alias code="code --max-memory=4096"
This prevents my system from freezing up, since VS Code cannot play around with all of my memory. It can only use 4GB / 4096MB of it. Unfortunately this measure does not completely fix the issue. It only makes it more bearable.
In my case it seemed to be strongly related to rapidly changing files due to switching branches with git.
EDIT: My NVIDIA drivers and Wayland had some glitches that did not only apply to VSCode. I now use X11.
Upvotes: 1
Reputation: 11
I had the same problem and adding these settings to Visual Studio Code the PC freezing doesn't happen anymore:
Open VS Code settings (press F1 -> "Preferences: Open Settings (JSON)";
Add these json properties at the end of your settings
"search.searchOnType": true,
"search.followSymlinks": false,
"search.collapseResults": "auto",
"search.maxResults": 2000,
Save settings.
Upvotes: 1
Reputation: 953
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
Upvotes: 14
Reputation: 71
If the problem keeps occurring, I guess an extension is causing the issue (must be).
Try to remove the extensions one by one or disable it in settings then test again. I got the same issue and its fixed after removing the git blame
extension.
Upvotes: 3