How to Show Extension Logs

A quick guide on how to find and view logs for VS Code extensions, especially useful for debugging your own extensions.

When you’re building a VS Code extension, or even just trying to figure out what’s going on with an existing one, checking the extension logs is super helpful. I use this all the time when I’m debugging my “Audit Scope” extension.

Here’s how to get to those logs:

Using the Output Panel

  1. Go to View in the top menu bar.
  2. Select Output. This opens the Output panel, usually at the bottom of your VS Code window.
  3. Select Your Extension’s Log. In the Output panel, there’s a dropdown menu. Click on it and pick the extension whose logs you want to see. If you’re working on your own extension, like “Audit Scope”, you’ll see its name there.

Using the Command Palette

You can also get to logs through the Command Palette:

  1. Open the Command Palette: Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift-P (macOS).
  2. Search for Logs: Type Developer: Show Logs and then pick the specific log file you want to view right inside VS Code.

Keep in mind that how logs show up can be a bit different depending on the extension. Some might write to a general “Log (Extension Host)” channel, while others will have their own special output channels.