vscode: Code Helper High CPU Usage

Does this issue occur when all extensions are disabled?: Yes

I thought this might have been due to an extension since I ran disable-extensions and it didn’t happen that quickly, but after running Extension Bisect it happened, and gave me a message Extension Bisect is done but no extension has been identified. This might be a problem with Code.. As mentioned below this might have been because it attached to a process and was trying to debug a Node.js process. I noticed after I started Extension Bisect that the debugger attached only when I started Extension Bisect (I had an existing process running before that, that maybe failed to attach???).

  • VS Code Version: Version: 1.69.2 (Universal)
  • OS Version: 13.0 Beta (22A5311f)

Steps to Reproduce:

Unknown exactly how to reproduce this, but it happens pretty frequently. Shortly after launching VS Code the Code Helper process takes up a lot of CPU usage. It seems like this might be correlated to when I start debugging a Node.js process.

One more note, I’m running 2 processes: tsc --watch & nodemon.

Attached are some screenshots that might be helpful.

Please let me know what additional steps I can do to help debug/troubleshoot this.

Screenshot 2022-08-01 at 10 23 29 AM Screenshot 2022-08-01 at 10 13 01 AM Screenshot 2022-08-01 at 10 12 56 AM

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Adding to the thread, M1 Pro seems to be having this issue as well.

Version: 1.70.0 Commit: da76f93349a72022ca4670c1b84860304616aaa2 Date: 2022-08-04T04:39:20.716Z (4 days ago) Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Darwin arm64 21.6.0

Screen Shot 2022-08-08 at 9 34 21 PM

Information when that process is queried through the ps aux | grep 31956

panchi           31956 100.2  2.8 468852752 473152   ??  R     9:27PM   7:25.06 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node --inspect-port=0 /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork --type=extensionHost --skipWorkspaceStorageLock
panchi           31964   0.0  0.2 446762576  31472   ??  S     9:27PM   0:00.14 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=31956
panchi           33445   0.0  0.0 408637584   1792 s004  S+    9:37PM   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox 31956

Yeah, looks like it. Reopening and forwarding to @connor4312 for investigation

Screenshot 2022-08-30 at 08 25 52 Screenshot 2022-08-30 at 08 25 45

When this happens please use this guide to profile the extension host: https://github.com/Microsoft/vscode/wiki/Performance-Issues#profile-the-running-extensions