Reputation: 8420
My VS Code frequently shows an error, something like "Error: cannot read property 'name' of undefined". The 'ESLint' tag in the status bar also shows up in red with an exclamation mark.
I suspect my team's custom ESLint plugin. I'd like to see the stack trace of the failure, which would probably confirm or refute my theory.
Does VS Code keep logs for this kind of error? If so, where are they?
(I'm running it on a Mac.)
Upvotes: 59
Views: 126135
Reputation: 32667
VS Code has a couple of commands for opening its logs folders:
Developer: Open Logs Folder
command.Developer: Open Extensions Logs Folder
.You can search for those commands in the Command Palette in the usual way.
These commands spawn a new Finder window on macOS, or open in File Explorer on Windows.
Upvotes: 61
Reputation: 482
For clarification if anyone else stumbles on this, type >Developer: Open Logs Folder
with the>
symbol to start
Upvotes: 8
Reputation: 12520
You can use the VSC command palette.
VSC stores its logs in various files depending on the purpose of those logs. There are a few commands to view them.
View the logs in your editor with the command:
>Developer: Show logs
Then select which log file you want to view.
OR
View the log files in your file navigator with the command:
>Developer: Open Logs Folder
Screenshot of command pallet log options
Upvotes: 6
Reputation: 175
I believe this is the directory you're looking for on MacOS: ~/Library/Application Support/Code/logs/
. I'm not sure if extensions typically store their logs and stuff elsewhere, but they'll likely be somewhere in the Code
folder.
Upvotes: 12