Find and view the VS Code Extension error and Global Logs

avatar
Borislav Hadzhiev

Last updated: Apr 6, 2024
4 min

banner

# Table of Contents

  1. The location of the VS Code Extension error logs
  2. Opening the developer tools in VS Code
  3. Open the extension Logs folder in Finder/Explorer
  4. Open the VS Code logs folder in Finder/Explorer
  5. Opening a specific log file in VS Code
  6. Open the extension error logs from the Output tab

# The location of the VS Code Extension error logs

The easiest way to find the extension error logs in VS Code is to:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux
  • Command + Shift + P on macOS
Note: you can also press F1 to open the Command Palette.
  1. Type show logs and select Developer: Show Logs....

developer show logs

  1. From the dropdown menu, select Extension Host.

select extension host

The command will open the OUTPUT tab in your VS Code editor with the Extension Host filter active.

extension host filter active

# Opening the developer tools in VS Code

VS Code is written in Electron, so you can check the messages it logs to the console.

If you need to open the VS Code developer tools to see the messages that get logged:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type toggle developer and select Developer: Toggle Developer Tools.

toggle developer tools

A new developer tools window opens to the side where you can see the logs in the Console tab.

view logs in console

You can also open the developer tools by clicking on:

  1. Help in the top menu.
  2. Selecting Toggle developer tools.
Note that you might have to press Alt to show the top menu on Windows and Linux.

click help toggle developer tools

# Open the extension Logs folder in Finder/Explorer

If you need to open the extension logs folder in Finder or Explorer:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type open log and select Developer: Open Extension Logs Folder.

developer open extension logs folder

The command will open the extension logs folder in Finder/Explorer.

contents of extension host folder

# Open the VS Code logs folder in Finder/Explorer

The same approach can be used to open the VS Code logs folder in Finder or explorer:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux
  • Command + Shift + P on macOS
Note: you can also press F1 to open the Command Palette.
  1. Type open log and select Developer: Open Logs Folder.

developer open logs folder

The command will open your logs folder in Finder/Explorer.

vscode contents logs folder

# Opening a specific log file in VS Code

You can also open a specific log file:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux
  • Command + Shift + P on macOS
Note: you can also press F1 to open the Command Palette.
  1. Type open log and select Developer: Open Log File....

developer open log file

  1. Select the log file that you'd like to open, e.g. Extension Host.

select log file to open

  1. The command will open the specified log file directly in VS Code.

command opens log file in vscode

# Open the extension error logs from the Output tab

You can also use the Output tab to open the extension error logs:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux
  • Command + Shift + P on macOS
Note: you can also press F1 to open the Command Palette.
  1. Type output focus and select Output: Focus on Output View.

output focus on output view

The command will open and focus the Output view.

You can click on the dropdown menu and select Extension Host or any other channel you want to see the logs of.

click dropdown select extension host

Alternatively, you can:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux
  • Command + Shift + P on macOS
Note: you can also press F1 to open the Command Palette.
  1. Type output show and select Output: Show Output Channels.

show output channels

  1. Select your preferred Output channel, e.g. Extension Host.

select preferred output channel

If you need to identify or change the VS Code extension location, click on the link and follow the instructions.

I've also written an article on how to view the local history and restore previous file versions in VS Code.

# Additional Resources

You can learn more about the related topics by checking out the following tutorials:

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.