Where are the VSCode error logs for extensions?

Visual Studio-CodeVscode Extensions

Visual Studio-Code Problem Overview


When I get an extension error I have no way of knowing why the error happens.

Visual Studio-Code Solutions


Solution 1 - Visual Studio-Code

You're probably looking for:

cmd-shift-p -> Search Show Logs -> Extension Host

Solution 2 - Visual Studio-Code

From what I know there are no dedicated logs for extensions. When you are debugging your extension you can write notes to the console. However, when you have problems with an installed extension this won't help. But keep in mind vscode is kinda "web browser", so it has the usual browser developer tools (see Help -> Developer Tools),

enter image description here

which will show you runtime errors (and all the other stuff those tools allow usually, including the entire vscode DOM). That's probably the best option you have in such a scenario.

enter image description here

And for extensions that use previewHTML (or web views) there's a similar goodie, but tailored towards HTML development. Use ctrl/cmd+shift+P to open the command pallet and type "Webview Tools". Select the match to open a similar view like the one described in the first paragraph. But this one is only for the previewHTML content and allows you to debug that! This view is only available when a page containing a web view/previewHTML is active and closes automatically when the web view tab is closed.

Solution 3 - Visual Studio-Code

Another easy way is to select "Output" in the terminal window (open it from menu "Terminal" > "New Terminal" if it is not already open). Then, use the scrolling menu on the right side and select what you need.

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGyuriView Question on Stackoverflow
Solution 1 - Visual Studio-CodeBenno StraubView Answer on Stackoverflow
Solution 2 - Visual Studio-CodeMike LischkeView Answer on Stackoverflow
Solution 3 - Visual Studio-CodePozinuxView Answer on Stackoverflow