Reputation: 103
In macOS, my Vs Code can't read my extensions if I don't run it as root user.
It happened after I changed owner of /Applications/Visual Studio Code.app/Contents/MacOS/Electron
to install an extension called 'Custom CSS and JS Loader'. I don't what is correct permission here, I don't want to reinstall Vs Code currently.
If I run
ll /Applications/Visual\ Studio\ Code.app/Contents/MacOS
I got this output
-rwxr-xr-x 1 xyh wheel 221K Nov 13 09:01 Electron
Hope to get some help. Thanks !
Upvotes: 0
Views: 1240
Reputation: 2947
For me, the output to that ll
is:
-rwxr-xr-x 1 bobvork staff 221K Feb 11 06:56 Electron
I had a similar problem recently, where I installed an extension while running as root. I found that ~/.vscode/extensions
contained a file called .obsolete
that was owned by root. I just deleted the file, ran VS Code again and it was fixed.
Hope this helps you (or someone else)
Upvotes: 2