5

The Visual Code remote SSH extension allows editing any remote file in the embedded terminal just using code <filename> which is super useful.

However when opening a file with sudo e.g. sudo code /etc/fstabs it returns

sudo: code: command not found

Is there any way to allow the use of code to any user?

pditommaso
  • 3,186
  • 6
  • 28
  • 43

1 Answers1

0

I don't believe this is possible at the time of writing as it would require the underlying node which is running VSCode server to be running with sudo, which it is not.

I have opened a GitHub Issue here.

davetapley
  • 17,000
  • 12
  • 60
  • 86