Search code examples
visual-studio-codemacos-sierra

VS Code not running as root MacOS


I was trying to edit some system files and I entered sudo code <some-file> and VS code would start, but it would not start as root. I used t see some warnings that it was not recommended (for obvious reasons) but now it just seems to not run as root.

Was there some change or some setting I need to enable?


Solution

  • I was able to solve this by completely deleting the preferences in ~Library/preferences/com.microsoft.VSCode.helper.plist and ~Library/preferences/com.microsoft.VSCode.plist

    This allowed me to run again as root once I restarted the application, I am not sure how or why I got into this state though.