Identify VS Code Extensions Causing Performance Issues

Visual Studio Code is a highly customizable editor, but installing too many extensions—or poorly optimized ones—can lead to high CPU usage, slow startup times, and editor lag. This article provides a direct, step-by-step guide on how to use VS Code’s built-in diagnostic tools, such as the Process Explorer, Extension Bisect, and Startup Profiler, to quickly pinpoint and resolve the specific extensions causing performance issues.

Method 1: Use the Built-in Process Explorer

Just like the Task Manager on Windows or Activity Monitor on macOS, VS Code has its own Process Explorer. This tool shows exactly how much CPU and memory each running process—including individual extensions—is consuming.

  1. Open VS Code.
  2. Click on Help in the top menu bar, then select Open Process Explorer (or open the Command Palette with Ctrl+Shift+P / Cmd+Shift+P and search for Developer: Open Process Explorer).
  3. Expand the extensionHost process tree.
  4. Analyze the CPU (%) and Memory (MB) columns.
  5. If an extension is actively lagging your system, you will see its name listed alongside high CPU or memory usage. Right-click the offending process to kill it if necessary.

Method 2: Use Extension Bisect to Pinpoint the Culprit

If your editor is lagging but no single extension stands out in the Process Explorer, VS Code’s “Extension Bisect” utility is the most efficient way to find the culprit. It uses a binary search algorithm to disable half of your extensions at a time, asking you if the issue persists until it isolates the problematic one.

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
  2. Type and select Help: Start Extension Bisect.
  3. VS Code will temporarily disable half of your extensions and prompt you to restart.
  4. Test your editor. If the performance issue is gone, click Good. If the lag is still there, click Bad.
  5. Repeat this quick process until VS Code identifies the exact extension causing the issue.
  6. Once found, click Stop Bisect and choose to disable or uninstall the identified extension.

Method 3: Analyze Startup Performance

If VS Code is taking a long time to launch, the issue is likely an extension taking too long to activate during startup. You can view the exact activation time for every extension.

  1. Open the Command Palette.
  2. Type and select Developer: Startup Performance.
  3. A text document will open. Scroll down to the Extension Activation Stats section.
  4. Look at the Activation Time (listed in milliseconds) for each extension.
  5. Any extension taking longer than 500ms to activate is a candidate for optimization, disabling, or replacement with a lighter alternative.

Method 4: Test in Clean Mode

To confirm that your performance issues are definitely caused by extensions and not the core VS Code application or your hardware, you can launch VS Code with all extensions disabled.

  1. Close all instances of VS Code.
  2. Open your terminal or command prompt.
  3. Launch VS Code from the command line by typing: code --disable-extensions
  4. If the editor runs smoothly in this mode, you can be certain that one or more of your installed extensions are responsible for the performance degradation.