Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate Visual Studio Code into Google Cloud

How can I interact with the code on my Google App Engine instance from Visual Studio Code?

like image 756
dendog Avatar asked Jun 27 '18 16:06

dendog


2 Answers

You can now run Visual Studio Code from the Google Cloud Shell using https://github.com/cdr/code-server/

It comes down to downloading code-server, starting it and using the Web Preview functionality of Google Cloud Shell to use it.

See also: https://medium.com/@chees/how-to-run-visual-studio-code-in-google-cloud-shell-354d125d5748

like image 83
Christiaan Avatar answered Nov 10 '22 05:11

Christiaan


You can use SSHFS to mount a remote directory on a Google Cloud Virtual Machine (VM). It is very easy to setup and use compared to VNC or FTP:

  • First you have to access the VM via ssh. This is actually very easy and you don't need to generate any keys yourself. Just go to the console then: Compute Engine > VM Instances, then locate your instance and click on the SSH button at the far right. Tutorial and more info here.

  • Install SSHFS on your machine. If you have a mac, you can use brew cask install osxfuse and then brew install sshfs.

  • You are ready. Just type sshfs [you_user_name]@[external_ip_of_vm]:[directory_on_vm_to_mount_to] [local_mount_point], eg. sshfs [email protected]:/home/john ~/john-vm.

If you decided to setup VNC, here is a link to a very good tutorial on how to set it up on GC. And here is another link on how to setup SFTP.

like image 4
Salah Saleh Avatar answered Nov 10 '22 04:11

Salah Saleh