How can I run vscode with sudo on osx?

chadbr

I want to use vs code to edit .bash_profile

I setup the bash command (ala https://code.visualstudio.com/Docs/editor/setup)

edit... command prompt setup is now here: https://code.visualstudio.com/docs/setup/mac

if I type "sudo code .bash_profile" - I get "sudo: code: command not found"

Thanks - Chad

Benjamin Pasero

The following should do it:

sudo /Applications/Visual Studio Code.app/Contents/MacOS/Electron

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I run growisofs via sudo?

How can I run a VSCode command as a task

How can I run a Pipescript code in VSCode?

How can I run /usr/bin/Xorg without sudo?

How can I run detached command with sudo over ssh?

How can I run a script as sudo and for it to not ask me for a password?

How can I run a docker windows container on osx?

How can I run Mac OSX graphical Emacs in daemon mode?

how can I run NPM commends in VSCode terminal

How can I configure multiple formatters to run in a sequence on save in VSCode?

How can I run pip without a sudo (for mac)? It doesnt work without sudo

vscode, how can I use ITerm2 as my launch.json console externalTerminal on mac osx?

Can I use docker to run MSBuild on OSX?

Why can I not run an application installed using sudo without sudo?

Requiring sudo to run ghci on OSx

I can't run Python in VScode

I can't run DataTable in VSCode

How can I `alias sudo !!`?

How can I make VSCode render my HTML file on firefox whenever I run it

How do I run eclipse as sudo

Why can't I use 'sudo su' within a shell script? How to make a shell script run with sudo automatically

How can I run Python as root (or sudo) while still using my local pip?

How can I run rmmod from user space which doesn't have root(sudo) permission

How Can I Run PostgreSQL's "dropdb" Command on Linux *Without* Sudo-ing to the Postgres User?

How can I run commands in a bash script prefixed with sudo, but based on a flag?

Bash: how can I run `sudo -n true` in the background without interfering with `read`?

How can I run multiple python files at the same time in Mac OSX

How can I run a 32-bit app on 64-bit OSX 10.7.2?

Can somebody explain how to make vscode the default editor on osx?