Sunday 18 March 2018

VS Code save as Admin

For about 2 years now, VS Code has been my go to text editor. It has replaced BBEdit for standard text and NetBeans for web development. I even prefer it to MySQL Workbench when working with databases.
Part of the appeal of VS Code is its extensibility and the growing number of plugins that allow me to do almost anything.
However, I have had to keep BBEdit around for one particular scenario: saving system configuration files, or any file that requires elevated privileges. On Windows, this is not such an issue, as I normally run VS Code as Administrator, but on a Mac it has caused problems.
I was perusing the forums to see if there was a plugin to allow this feature, but no luck. Each of the posts and issues I read that were related to this, seemed to say that it wasn't going to happen for some time. So, BBEdit has to remain.

For clarity, the only reason I decided to go away from BBEdit was the lack of debugging features.

Out of curiosity, and to prove to myself, that this is still an issue, I opened VS Code this morning and attempted to edit my Hosts file, and then resave it... but this happened:


Did I miss this in the change log?
How long has this been here?

I clicked the 'Retry as Admin...' button, and low and behold, I was asked for my password and the file was saved.
Well done Microsoft (and community), you have now managed to convert me over to VS Code completely.


No comments:

Post a Comment