Integrate Visual Studio Code into Google Cloud
Solution 1
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
Solution 2
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 thenbrew 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.
Solution 3
You can check VSCode remote as well. It was recently developed and is already in quite stable stage. Probably Remote SSH will help you the most in your case.
Related videos on Youtube
dendog
Updated on September 14, 2022Comments
-
dendog over 1 year
How can I interact with the code on my Google App Engine instance from Visual Studio Code?
-
Praveen Soni over 5 years
-
-
ribbit over 4 yearsnit: this is pointed out as a reply to the blog post, repeating here for convenience. Every mention of
linux-x64
should actually belinux-x86_64
. Just add the86_
and everything pretty much just falls into place.