vscode: VS Code freezes regularly on macOS 12.3 with Apple M1
I’m using the latest stable VS Code on my MacBook Pro 2021 with M1 chip for programming Python (and C++). I have been having issues with VS Code randomly slowing down and freezing until macOS asks to stop it. Then I have to terminate VS Code and restart it. That happens multiple times within a couple of hours, so it’s really annoying when coding & debugging.
The freeze happens out of nowhere. CPU load is very low, I’m not doing anything special or running expensive other programs in the background. I can’t really reproduce the freeze quickly, but it does happen regularly (roughly every 0,5-2h).
Seems like other users also have this issue: https://github.com/microsoft/vscode/issues/122111 and https://github.com/microsoft/vscode/issues/129076 Unfortunately, these issues were closed and locked without providing a solution.
- VS Code Version: 1.65.2
- OS Version: macOS 12.3
- MacBook Pro 2021 with Apple M1 Pro chip
My extensions are:
code --install-extension alefragnani.Bookmarks
code --install-extension cschlosser.doxdocgen
code --install-extension eamodio.gitlens
code --install-extension jeff-hykin.better-cpp-syntax
code --install-extension mhutchie.git-graph
code --install-extension ms-python.python
code --install-extension ms-python.vscode-pylance
code --install-extension ms-toolsai.jupyter
code --install-extension ms-toolsai.jupyter-keymap
code --install-extension ms-toolsai.jupyter-renderers
code --install-extension ms-vscode-remote.remote-containers
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension ms-vscode-remote.remote-ssh-edit
code --install-extension ms-vscode-remote.remote-wsl
code --install-extension ms-vscode.cmake-tools
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cpptools-extension-pack
code --install-extension ms-vscode.cpptools-themes
code --install-extension njpwerner.autodocstring
code --install-extension trond-snekvik.simple-rst
code --install-extension twxs.cmake
Since I need the extensions for development and I can’t quickly reproduce the freeze, I couldn’t test if the freeze eventually occurs with all extensions disabled.
Also, I tried recording a crash dump as described here, but no dump was created. Maybe because VS Code froze and didn’t crash.
Any help is really appreciated. This really disturbs my coding workflow.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 24
- Comments: 69 (10 by maintainers)
Same issue. And I found something strange. When

VS Code
is not responding, my Chrome costs CPU over 50%:After a few secs:
Only
VS Code
is not responding. Other Apps works well. After 10-20 sec, everything turns to good. This happens regularly when I switch apps bewteenchrome
andvscode
.Run
code -status
seems good:Update chrome not help. (Current version 103.0.5060.53 )
same issue here on M1 mac 12.5
For future reference and FYI @deepak1556:
I have removed CMake and CMake tool extensions and my freeze problem went away.
I think this is a hard issue to reproduce and debug, I suggest anyone facing this issue to disable some part of their extensions to see what is causing the problem and report it here. For me, it was
CMake
however I am still suspecting that there might be a problematic API that is called from the extension that causes the problem.I get this issue (same behaviour but perhaps different reasons to OP) when I run a bash script for deployment which does a lot of cleaning and building of js packages in a monorepo/workspace that I currently have open in VS Code. I also get it sometimes when just doing a
npx npkill
to dump allnode_module
folders in the monorepo, sometimes followed by ayarn install
. The commands don’t error out, but often I’ll have to restart VS Code.Same behaviour; VS Code freezes and after a while it either recovers or gives me an unresponsive modal. Most of the time I have to force quite the app and restart.
I’m using macOS Monterey 12.4 on an M1 Pro.
I just had a complete macos crash on M1 when opening vscode.
Vscode opened and It popped a recommendation for an angular extension, after clicking on extension it first froze my mouse and keyboard and then the mac restarted. After it restarted I got a send report to apple popup, by clicking on send report it then also froze the whole computer. Not sure if it’s vscode or M1 related issue. IMHO M1 is the worst computer experience i’ve ever had including windows 98 and windows vista. Vscode on my old intel mac has never crashed and is still working fine.
@trkee As in the workspace folder or the actual vscode app?
@deepak1556 I’d closed my ticket - I’m on an Intel Mac - and it is still doing the same thing. I cannot get you a sample because the process is not responding - the sample window just hangs. I can’t even screen capture it because nothing responds now.