When VS Code suddenly feels laggy, your fan spins up, and CPU usage stays high, the most common cause is usually not the editor itself, but extension conflicts or abnormal extension behavior.
This guide gives you a direct, actionable workflow to identify the issue quickly.
Start with the Fastest Method: Start Extension Bisect
Start Extension Bisect uses a binary search approach:
in each round, VS Code temporarily disables half of your extensions and restarts. Based on whether the issue still appears, it narrows down the suspect list quickly.
Steps:
- Press
Ctrl+Shift+P(macOS:Cmd+Shift+P) to open the Command Palette. - Run
Start Extension Bisect. - After each restart, check whether high CPU usage and lag are still present, then choose
Good noworThis is bad. - After several rounds, VS Code will show the likely problematic extension(s).
What to Do After You Find the Suspect
Once you identify the extension, handle it in this order:
- Update the extension to the latest version.
- If the issue remains, disable it for 1-2 days and observe.
- If alternatives exist, switch to a lighter extension.
- If you must keep it, review advanced settings and disable unnecessary real-time analysis, indexing, or file watching features.
Two Common “Amplifiers” You Might Overlook
Even if an extension is the root cause, these settings can amplify CPU load:
-
Search scope is too broad
If build output, dependency folders, and logs are included in global search, extensions and indexers may stay under continuous heavy load. -
File watching includes huge folders or symlinks
Symlinks, cache directories, and generated folders can trigger large numbers of file events and force extensions to reprocess repeatedly.
You can trim scope in settings.json, for example:
|
|
Postmortem Tip
After isolating the issue, record three things: extension name, trigger scenario, and final fix.
That note will save time when you migrate your environment or rebuild your machine later.
Summary
For high VS Code CPU usage, the most effective path is to use Start Extension Bisect first, then tighten search and file watching scope.
Locate first, optimize second. It is faster and more reliable than randomly disabling many extensions.