Here is the step by step guide to use visual studio code in goggle colaboratory
STEP 1:Install python library "colabcode"!pip install colabcode
STEP 2:Now import colabcode libraryfrom colabcode import ColabCode
ColabCode(port=10000)
STEP 3:
After running above code you will get a link in output cell that will be just next to "NgrokTunnel:" , in my case you can see in image below highlighted with red box.
So when you click on that link , that link will open in new tab in your browser.
That link you opened in new tab is nothing but your visual studio code server, now you can use visual studio code in google colaboratory.
source: https://bit.ly/2LdZ7Fu