VS Code — Code Helper process using more than 100% CPU on macOS
I noticed that my MacBook gets hot and noisy (fans) when using VS Code (v1.31). The Activity Monitor shows the process Code Helper using more than 100% of CPU. It started happening with one repository which is huge. Only one window opened, no files opened, and it always uses more than 100% CPU.
Checking in Microsoft/GitHub, there was an issue reported but they closed it saying «This issue has been closed automatically because it needs more information and has not had recent activity.» , but it is still an ongoing issue. I tried some of the recommendations in the comments but didn’t work.
Does anybody has more info and/or know how to avoid this? Is it possible to make some configurations for VS Code to not burn the MacBook?
9 Answers 9
This is most likely an issue with a plugin in VS Code. For me, it was Pyright.
- Open Activity Monitor
- Within the list of prcesses, find the one that has the highest CPU usage (it should already be at the top).
- For this process, find the PID number.
Then, within terminal, type this:
ps aux | grep 20295
note that you should change «20295» to the PID number that you found in step 3
This should give you the information as to which extension it is. I, personally, would remove it, but that’s up to you. At the very least, please contact the maintainer of that package and make sure that they are aware of the issue.
After removing the extension, exit VS Code, wait for a bit while the fans slow down and then start again. It shouldn’t give you a problem now.
Killing processes on mac with kill -9 [PID] and restarting VSC helped me to solve the problem.
adding the following config and restarting the editor it seems to be resolved:
For React Native developers, try adding the expo folder in the vscode configuration to the «files.watcherExclude» . There are too many large files in that folder and its cache folder.
The behaviour you describe could either be a bug in VS Code or it is intended behaviour simply because the numbers of files you have require large amounts of CPU time to process. I strongly suspect that the problem is a bug.
The issue you have found have the same externally observables as your problem, i.e. the CPU usage of Code Helper is very high. However there could be many different reasons for that to happen. Therefore it is not a problem that that specific issue has been closed for outside comments.
I would highly suggest opening a new issue instead. Go to this page:
And click the «New issue» button. Select that you want to file a «Bug report». Then please describe everything carefully, including which of the recommendations you have tried that did not work.
Hopefully the VSCode team will be able to fix the bug and release a new and fixed version.
Code helper mac os что это
VS Code — Code Helper process using more than 100% CPU on macOS
I noticed that my MacBook gets hot and noisy (fans) when using VS Code (v1.31). The Activity Monitor shows the process Code Helper using more than 100% of CPU. It started happening with one repository which is huge. Only one window opened, no files opened, and it always uses more than 100% CPU.
Checking in Microsoft/GitHub, there was an issue reported but they closed it saying «This issue has been closed automatically because it needs more information and has not had recent activity.» , but it is still an ongoing issue. I tried some of the recommendations in the comments but didn’t work.
Does anybody has more info and/or know how to avoid this? Is it possible to make some configurations for VS Code to not burn the MacBook?
5 Answers 5
This is most likely an issue with a plugin in VS Code. For me, it was Pyright.
- Open Activity Monitor
- Within the list of prcesses, find the one that has the highest CPU usage (it should already be at the top).
- For this process, find the PID number.
Then, within terminal, type this:
ps aux | grep 20295
note that you should change «20295» to the PID number that you found in step 3
This should give you the information as to which extension it is. I, personally, would remove it, but that’s up to you. At the very least, please contact the maintainer of that package and make sure that they are aware of the issue.
After removing the extension, exit VS Code, wait for a bit while the fans slow down and then start again. It shouldn’t give you a problem now.
The behaviour you describe could either be a bug in VS Code or it is intended behaviour simply because the numbers of files you have require large amounts of CPU time to process. I strongly suspect that the problem is a bug.
The issue you have found have the same externally observables as your problem, i.e. the CPU usage of Code Helper is very high. However there could be many different reasons for that to happen. Therefore it is not a problem that that specific issue has been closed for outside comments.
I would highly suggest opening a new issue instead. Go to this page:
And click the «New issue» button. Select that you want to file a «Bug report». Then please describe everything carefully, including which of the recommendations you have tried that did not work.
Hopefully the VSCode team will be able to fix the bug and release a new and fixed version.
Code helper : High CPU usage on macOS Sierra #31388
The text was updated successfully, but these errors were encountered:
jkwuc89 commented Aug 4, 2017
Here are some simple reproduction steps for this issue:
- Open a terminal and change to your $HOME directory
- Run code —disable-extensions .
- Open Activity Monitor. Observe that the Code Helper process is running at well over 100% CPU usage. My guess is that this is caused by it parsing through the entire $HOME directory tree structure.
- Quit code by pressing Cmd + Q. Inside Activity Monitor, observe that Code Helper is still running and its CPU usage is still over 100%. It does eventually go away.
bpasero commented Aug 11, 2017
The original authors process that is 100% seems to be TypeScript: damien 29107 100,0 3,1 3428428 261784 ?? R 3:45 8:39.02 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js —globalTypingsCacheLocation /Users/damien/Library/Caches/typescript/2.4 —enableTelemetry
arxpoetica commented Sep 13, 2017
Following @jkwuc89’s steps, I can confirm that it’s freaking out, specifically in the $HOME directory:
wind2412 commented Oct 4, 2017
I have the same problem. Vscode version is the newest 1.16.1 now. However the CPU level is so high and my mac got very hot. Although I quitted vscode, the two code helper processes are working background so that I must kill them by myself. I’m writing c++.
darkdescendant commented Oct 7, 2017
Ditto with VSCode 1.7X I just updated today. Even after quitting VSCode Code helper and it’s python processes absorbed all the memory on my machine (disk and RAM). The only time I’ve ever seen Mac OS X complain about system put of memory is the 2 times I’ve tried to use VSCode at work. Not sure what is going on but obviously there is some sort of run away processing going on with codehelper.
The code base I am using this on is a large C++ and C# code base.
xiaoshuw commented Oct 8, 2017
I have the same problem with 1.17. What is strange is it only occurs to one project directory. Don’t know why is that as other directory used to develop vue component seems all right. I have tried to set useExperimentalWater and add file.excludes etc. It is the same result.
wind2412 commented Oct 8, 2017
@darkdescendant After I banned the Microsoft C++ extensions, my cpu level seems to be normal again. My Activity Monitor tells me the Microsoft C++ extensions make cpu in a high level. However, C++ extensions got updated yesterday and I didn’t make a test. @xiaoshuw Vue I don’t know.
darkdescendant commented Oct 8, 2017
Yeah, I figured it was that extension. But since that is the whole reason for me in using VSCode over Sublime it kind of kills it for me. 🙁
I might re-install and see what happens since you noted the extension was updated.
darkdescendant commented Oct 8, 2017
xiaoshuw commented Oct 8, 2017
Well, mine doesn’t have the C/C++ extension. Also, it doesn’t have issues in one project but does have on another. As I am using the vscodevim, it renders the vscode useless because after one key stroke, it seems waiting for the run-away process so it effectively useless. I didn’t have problem with 1.16, it only started after recent update.
markeissler commented Oct 27, 2017
High CPU on macOS is the number one thing that drives me nuts on VSCode and the very next thing is the fact that it’s such a pain to debug. MS really needs to provide some tools outside of the standard Google Dev Tools (which don’t make it easy).
What I want to see is that VSCode monitors resource usage and runaway extensions. I want to see a pop up or some other easy-to-read diagnostic along with an offer to disable the offending extension. The last thing I want to do is to spend so much time debugging my development tools themselves.
mjbvz commented Oct 27, 2017
@sanghin Do you still see the originally reported TypeScript cpu issue on VSCode 1.18 insiders? If so, does this reproduce for all folders you open or just some of them?
For anyone seeing high cpu usage with the C++ extension, please try following up with that extension instead
xiaoshuw commented Oct 28, 2017
I can no longer see the run away process anymore — with the same 1.17. I didn’t do anything — besides in between I have probably rebooted my machine a few times. I didn’t use TypeScript. As I said earlier, I have two projects of similar setup. Only one project had this issue.
wind2412 commented Oct 28, 2017
In fact, I think the C/C++ Extension gets much better after updating its version. These days there is only one time getting very hot but soon it gets normal cpu level.
sanghin commented Oct 30, 2017
@mjbvz Sorry for my late (late) response. This issue can be closed. I’m now on :
- VSCode 1.17.2 (1.17.2)
- High Sierra Version 10.13
I’m pretty sure that the issue was caused by an incomplete configuration of file.exclude and search.exclude options
arxpoetica commented Nov 1, 2017 •
Code Version 1.17.2 (1.17.2) is still burning extremely hot in my $HOME folder on Mac:
- Go to $HOME directory
- type code —disable-extensions .
- watch it burn:
francoiscabrol commented Nov 15, 2017
I have the same issue with macos sierra, Code helper takes 100% CPU
sanghin commented Nov 15, 2017
Code Version 1.17.2 (1.17.2) is still burning extremely hot in my $HOME folder on Mac:
You should add some ignore rules in your user settings (files.exclude and search.exclude), vscode tries to index every files in your $HOME folder
francoiscabrol commented Nov 15, 2017
I have added the rules but it didn’t fix the issue. But finally I installed the old 1.17.2 version (instead of the 1.18) and it looks stable now
r-kat commented Nov 16, 2017 •
I had to uninstall Visual Studio because of high CPU usage with maximum of over 120% and minimum of 5% even at the lowest usage it is insane. Could not kill process, restart took more than few minutes.
I am using latest version and really wanted to like it due to it’s good look and feel and pre-built extensions compared to other editors which has no control over external extensions.
arxpoetica commented Nov 16, 2017
@sanghin one shouldn’t have to install ignore rules to keep an index from crashing ms code.
fpiraneo commented Nov 19, 2017
Same issue here! I don’t use any C++ extension. just writing LaTeX document.
Again please: What I have to do to preserve my battery level from falling down at 10% in less than 10 minutes?
Code helper : High CPU usage on macOS Sierra #31388
The text was updated successfully, but these errors were encountered:
Here are some simple reproduction steps for this issue:
- Open a terminal and change to your $HOME directory
- Run code —disable-extensions .
- Open Activity Monitor. Observe that the Code Helper process is running at well over 100% CPU usage. My guess is that this is caused by it parsing through the entire $HOME directory tree structure.
- Quit code by pressing Cmd + Q. Inside Activity Monitor, observe that Code Helper is still running and its CPU usage is still over 100%. It does eventually go away.
The original authors process that is 100% seems to be TypeScript: damien 29107 100,0 3,1 3428428 261784 ?? R 3:45 8:39.02 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js —globalTypingsCacheLocation /Users/damien/Library/Caches/typescript/2.4 —enableTelemetry
Following @jkwuc89’s steps, I can confirm that it’s freaking out, specifically in the $HOME directory:
I have the same problem. Vscode version is the newest 1.16.1 now. However the CPU level is so high and my mac got very hot. Although I quitted vscode, the two code helper processes are working background so that I must kill them by myself. I’m writing c++.
Ditto with VSCode 1.7X I just updated today. Even after quitting VSCode Code helper and it’s python processes absorbed all the memory on my machine (disk and RAM). The only time I’ve ever seen Mac OS X complain about system put of memory is the 2 times I’ve tried to use VSCode at work. Not sure what is going on but obviously there is some sort of run away processing going on with codehelper.
The code base I am using this on is a large C++ and C# code base.
I have the same problem with 1.17. What is strange is it only occurs to one project directory. Don’t know why is that as other directory used to develop vue component seems all right. I have tried to set useExperimentalWater and add file.excludes etc. It is the same result.
@darkdescendant After I banned the Microsoft C++ extensions, my cpu level seems to be normal again. My Activity Monitor tells me the Microsoft C++ extensions make cpu in a high level. However, C++ extensions got updated yesterday and I didn’t make a test. @xiaoshuw Vue I don’t know.
Yeah, I figured it was that extension. But since that is the whole reason for me in using VSCode over Sublime it kind of kills it for me. 🙁
I might re-install and see what happens since you noted the extension was updated.
Well, mine doesn’t have the C/C++ extension. Also, it doesn’t have issues in one project but does have on another. As I am using the vscodevim, it renders the vscode useless because after one key stroke, it seems waiting for the run-away process so it effectively useless. I didn’t have problem with 1.16, it only started after recent update.
High CPU on macOS is the number one thing that drives me nuts on VSCode and the very next thing is the fact that it’s such a pain to debug. MS really needs to provide some tools outside of the standard Google Dev Tools (which don’t make it easy).
What I want to see is that VSCode monitors resource usage and runaway extensions. I want to see a pop up or some other easy-to-read diagnostic along with an offer to disable the offending extension. The last thing I want to do is to spend so much time debugging my development tools themselves.
@sanghin Do you still see the originally reported TypeScript cpu issue on VSCode 1.18 insiders? If so, does this reproduce for all folders you open or just some of them?
For anyone seeing high cpu usage with the C++ extension, please try following up with that extension instead
I can no longer see the run away process anymore — with the same 1.17. I didn’t do anything — besides in between I have probably rebooted my machine a few times. I didn’t use TypeScript. As I said earlier, I have two projects of similar setup. Only one project had this issue.
In fact, I think the C/C++ Extension gets much better after updating its version. These days there is only one time getting very hot but soon it gets normal cpu level.
@mjbvz Sorry for my late (late) response. This issue can be closed. I’m now on :
Не покупайте CleanMyMac. Я удалил и всем советую
В закладки
После покупки своего первого компьютера Apple я был просто в восторге от CleanMyMac. Красивое визуальное оформление, дружелюбный интерфейс, очистка за несколько секунд.
При переходе с Windows я банально не знал, как вручную чистить macOS (тогда еще OS X), чтобы не удалить чего-то нужного и решил прибегнуть к помощи одной из самых популярных программ для Mac.
Купил лицензию на CleanMyMac 2 и около года регулярно проводил очистку, поражаясь счетчику очищенного приложением пространства.
Со временем я понял, что это лишь механизм по выкачиванию денег с ленивых пользователей.
Разработчики CleanMyMac давно исчерпали себя
После выхода третьей версии создатели любезно предложили заплатить. Обладателям лицензии, разумеется, предложили скидку, но платить немалую сумму, которая сопоставима с ценой среднестатистического приложения не хотелось.
Некоторое время продолжал пользоваться старой версией программы, а при переезде на новый компьютер немного посидел на взломанной пиратке CleanMyMac 3.
Я просто не увидел реальных отличий. За что нужно заново платить разработчикам?
Пару незначительных мелочей и мифическое увеличение скорости работы того не стоили.
В 2018 году ситуация повторилась. Разработчики опять захотели денег и выкатили платный апдейт CleanMyMac X.
Да, они перерисовали дизайн программы, добавили множество визуальных эффектов и анимаций, но, разве это главное в программе для очистки мусора?
Сейчас купить CleanMyMac X можно за $89.95! Для тех, кто не желает сразу расставаться с такой суммой, предлагают ежегодную подписку в размере $39.95.
В любом случае через 2-3 года выйдет платное обновление и первых попросят оплатить 40-50% стоимости, а вторые уже и так переплатят за этот апдейт.
Если ситуация уже повторялась дважды, она обязательно повторится и в третий раз.
При этом реально новых нужных каждому фишек в программе не появляется уже несколько лет.
Неудивительно, что те же разработчики придумали SetApp
Осознавая ситуацию, разработчики придумали еще один канал сбыта своей программы – сервис SetApp.
Идея предоставлять пользователю набор программ по подписке просто отличная, но на практике заручиться поддержкой серьезных разработчиков так и не удалось.
В SetApp с трудом удастся найти 5-7 действительно нужных программ для Mac.
А если и найдете, то покупка лицензии на каждую программу обойдется дешевле подписки на сервис за полтора-два года.
Большинство приложений в SetApp – будто ширма для продвижения CleanMyMac.
Да, есть там и нужные программы, но некоторые из них с легкостью заменяются бесплатными или более дешевыми аналогами.
Чаще всего CleanMyMac создает видимость работы
Если хотите увидеть реальную пользу от CleanMyMac – очищайте вручную корзину перед запуском приложения.
Тогда результаты чистки перестанут исчисляться десятками ГБ и будут выглядеть намного скромнее.
У многих пользователей больше всего мусора для CleanMyMac оставляет браузер и используемые мессенджеры.
Вручную очистить кэш для двух-трех приложений быстрее, чем ждать очистку от CleanMyMac.
Месяц не проводил очистку системы, а перед запуском программы почистил корзину, кэш Safari, Telegram и Skype. В итоге чудо-утилита смогла освободить мне смешные 133 Мб.
Такими темпами за год CleanMyMac почистит не более пары гигабайт.
Стоит ли ради этого платить $39.95 в год или покупать лицензию за $89.95?
CleanMyMac вполне может сломать другой софт или macOS
Подобные приложения работают достаточно просто. Разработчики закладывают в алгоритм работы удаление папок с кэшем и временными данными для всех распространенных приложений.
CleanMyMac проверяет эти папки и удаляет все, что разработчики считают ненужным.
После очередного апдейта программа может начать хранить кэш в другой папке или называть сами файлы по-другому. Пока разработчики CleanMyMac не выпустят обновление, утилита не найдет новый мусор.
Это вам не Windows, где подобные «клинеры» могут сделать снимок системного реестра и потом четко понять где наследило то или иное приложение.
Если какая-нибудь программа глубоко интегрируется в macOS, удаление хвостов за ней может негативно сказаться на работоспособности компьютера.
Тут или устраивать агрессивную чистку с риском для ОС, либо сознательно оставлять хвосты и мусор, чтобы не навредить.
В практике использования CleanMyMac были как первые, так и вторые случаи.
Стороннее приложение после этого можно переустановить, а сломанные системные программы лечатся только переустановкой macOS.
Пиратская версия CleanMyMac работает еще хуже
Жадные любители CleanMyMac снижают и без того сомнительную эффективность утилиты.
Взломанные версии не обновляются, а в обновлениях содержатся данные об изменившемся расположении кэша или ненужных файлов для разных программ.
Можно произвести чистку, которая будет актуальна на момент выхода взломанной версии, но через месяц-другой часть системного мусора изменит свое расположение и не будет очищаться программой.
Хотите полную очистку, ищите новую взломанную версию.
Как же тогда чистить Mac без CleanMyMac?
Здесь могла бы быть реклама другого приложения для очистки Mac – но её тут нет!
Лучше всего удалять мусор на Mac вручную. Ни один алгоритм, написанный для большого числа пользователей, не окажется лучше ручной чистки в каждом конкретном случае.
Большинство приложений сами отлично справляются с очисткой кэша, нужно только отыскать такую опцию в настройках.
Любителям автоматического удаления программ могу посоветовать бесплатный AppCleaner.
А еще лучше удалять программу средствами системы и проверять папку /Library/Application Support на наличие хвостов и зависимостей.
Очистку папки с загрузками легко автоматизировать.
Чтобы наглядно видеть занятое место на Mac рекомендую программу DaisyDisk. Купил приложение почти одновременно с CleanMyMac, с того времени DaisyDisk стабильно обновляется и ни разу не просило денег.
Лучший инструмент для ручной чистки системы. Он не будет водить по местам с мелкими файлами, которые занимают несколько мегабайт.
Вместо этого программа сразу же покажет, что много места занимает давно скачанный и просмотренный фильм в 4К, старые бэкапы iPhone в iTunes или исходники давно завершенного проекта.
Одна вдумчивая очистка Mac таким способом раз в полгода освободит гораздо больше места, чем CleanMyMac за несколько лет работы.
В закладки