DEV Community

Cover image for VS Code on my Phone (How I did it)
Adrian Twarog
Adrian Twarog

Posted on

VS Code on my Phone (How I did it)

I setup vscode on my mobile and started coding. Normally programming like this is only possible on a desktop.

But there is a great way to start doing HTML, CSS, JS right on your phone, tablet, via WiFi or Internet!

This was fun!

This was used with the package: Code Server
https://github.com/cdr/code-server

It can be done with literally two lines of code:
Installation:



curl -fsSL https://code-server.dev/install.sh | sh


Enter fullscreen mode Exit fullscreen mode

Bring it online:



code-server --link


Enter fullscreen mode Exit fullscreen mode

Of course, if you don't have a physical machine, you can still run this up on a free Amazon and Google cloud platform on the free tier. This allows you to run VS Code on iPad, iPhone, Android, etc.

I have a full video that is covering the whole setup if you're interested.

Here is the Twitter post which went off with lots of comments!!!

Follow and support me:

Special thanks if you subscribe to my channel :)

Want to see more:

I will try to post new great content every day. Here are the latest items:

Top comments (10)

Collapse
 
devhammed profile image
Hammed Oyedele

On Android, you can install Termux then run above commands so you don't even need a WiFi or hosting it online, it would run locally with 127.0.0.1 IP address.

Collapse
 
gamecube762 profile image
Gamecube762

I'd also recommend Hacker's Keyboard for Android. It provides a full keyboard keyset (modifier keys, function keys, navigation keys, ext). SSHing with Termux is a lot more easier when you can make use of your keyboard shortcuts.

Collapse
 
shubhamverma profile image
Shubham Verma

True, but this method of hosting server on PC can help you edit PC files.
Reverse can be done if hosted from phone.

Collapse
 
devhammed profile image
Hammed Oyedele

This is not an issue if you are using Git.

Collapse
 
phantware profile image
Ismail Jamiu Babatunde

How can I root my phone to use termux, when I created folders on termux, I would not see it on my phone. I tried couple of videos but I'm still not able to do it.

I will be grateful for your help

Collapse
 
michealweb11 profile image
Micheal Olabisi

You don’t need to root your phone you can get termux from fdroid website once you install it on your phone termux has it's own folder and you can also cd to another directory where you have created your file and folder from normal apps like files or your preferred code editor

Collapse
 
jdog787 profile image
JDOG787

Wow that’s cool! Also nice video πŸ˜‚

Collapse
 
zdev1official profile image
ZDev1Official

That's amazing 🀩🀩

Collapse
 
kokochef profile image
Kaustabh Kakoty

Unfortunate that Monaco editor is not supported in mobile. But this is cool though.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.