DEV Community

Cover image for VSCode on Android Phone
Anna Villarreal
Anna Villarreal

Posted on

VSCode on Android Phone

Hello everyone! This is my first post here! I've been learning to code for the last 6 months. I thought it would be super cool if I could code on my phone. Turns out it's 100% possible. I purchased VSCode from the play store, since that's what I regularly use. (I was reading there were ways around this, but Termux has since been removed from the play store, and after trying several things I settled on paying the $11.99.)

What a delight! Upon installing it on my phone, I wondered how to access my files on mac from my phone, so I could edit them and have them updated on my computer. I still have yet to figure that out. Let me know your input on this! (without paying for cloud!)

Enter user information in terminal

At first I was confused how to connect my github account to VSCode on my android phone. After poking around a bit, I realized I would be asked for my credentials upon trying to commit anything. So go ahead and just try to commit something and it will walk you through the steps! WHEW! At least now I can grab my github files from my phone, so I have a way of accessing a version of them. Hopefully, this can save someone some time, since there isn't too much documentation about it (that I was able to find).

User account connected in VSCode

Linking VSCode on your android to your github account will also take care of the mysterious grayed out "cloud changes" you will see in the app when nothing is connected.

Personalized code environment

The app is definitely usable for more simple projects or perhaps working on a single component. It works best horizontally and takes a little getting used to. But, i'm pretty much fascinated. You can edit it as usual to make your own little comfy environment, just like on your laptop/desktop. Am I ridiculous for thinking it's cute? Probably. XD

Top comments (69)

Collapse
 
andersonpull profile image
Anderson Oliveira Bezerra

Very cool, I don't know how this app that you paid for works, but you can also access vscode online (vscode.dev/), it's free, I use it a lot on my iPad, it's a PWA (so it can be installed on your cell phone ), I've already used it to work with javascript frontend and I've already used it to create plugins for vscode itself, it's really cool that you shared its use, I'll research about vscode apps.

Collapse
 
hendrix04 profile image
Hendrix

Yeah... I wouldn't pay $12 for free open source software, lol. Especially software that can be loaded by just about any web browser.

Anyone reading this, please go to vscode.dev and don't do what the poster did.

Collapse
 
inthevortex profile image
Angsuman Ray

Exactly, I was confused whether to laugh or cry.

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Hey Anderson! I do have the free app on my computer and can access the web environment from my phone. However, they do not offer a downloadable version for my android phone. Well, I can download it, but it doesn't open on my phone. There are likely some hacks around this. I like the idea of being able to to edit things with or without an internet connection.

Collapse
 
andersonpull profile image
Anderson Oliveira Bezerra

As @mcpshiming mentioned, you can install the PWA for offline use, because what they basically did was create an app, open a webview, call the VScode link and a person who does that and charges is not a trustworthy person for you to have an app on your phone, I hope I was able to explain.
😄🤜🤛😃

Collapse
 
mcpshiming profile image
MCP

Hey Anna, you can actually install a PWA on your phone for offline use. If you are using Chrome, you can tap the three dots in the top right corner of the screen, then hit Install App. Once it's installed, you'll likely see a similar experience to what the app you installed offers.

Thread Thread
 
annavi11arrea1 profile image
Anna Villarreal

OMG That is so simple!!!!! Thank you for pointing that out!!!!!!!!!!!

Collapse
 
m-prindas profile image
Masoom PrInDa'S


I see this app on android playstore it’s amazing. It’s support offline

Collapse
 
bergamin profile image
Guilherme Taffarel Bergamin

Have you tried this on a desktop mode setting like Samsung Dex or Motorola Ready For?

Collapse
 
andersonpull profile image
Anderson Oliveira Bezerra

I haven't tried, but if the device has a browser the behavior should be the same.

Thread Thread
 
bergamin profile image
Guilherme Taffarel Bergamin

I have just tried it out... Unfortunately my phone model can't be connected directly to a monitor, but it works pretty well

Image description

It feels just like VSCode on the PC. If you could actually code in this, this would be brilliant, but I think you can't directly access local files through the browser without opening it for every website (I may be wrong) and I doubt you would be able to build and run stuff through this, which brings me to Stackblitz:

Image description

This would be able to run your code and I think there is a setting to sync with a repository on GitHub (I wish they would connect to GitLab as well, which is where my more serious projects are. Maybe one day), so you could actually fully use this in an emergency. Just plug a compatible phone to a monitor + bt keyboard and mouse and you wouldn't even need to have the files on your phone either...

Collapse
 
bergamin profile image
Guilherme Taffarel Bergamin • Edited

I started thinking of this kind of stuff since smartphones started becoming commonplace. I would love to be able to just bring a tablet to university with one of those very thin bt keyboards instead if a full blown laptop if I could.

Have you tried this on desktop mode? Something like Samsung Dex or Motorola Ready For?

Collapse
 
cloudburst profile image
Cloudburst (Leah)

Regarding file syncing: I personally use SyncThing for file syncing, since it works in the background and allows you to ignore certain files (such as build files and the ever bulky node_modules folder).

The only caviat is that it doesn't sync if you're not connected to the same network. I've not had to figure out how to make it work everywhere tho since the syncing works automatically, as long as your phone is on the same network as your computer it should just sync fully at maximum a few minutes after your last code edit on the computer.

Collapse
 
netapex profile image
Ollie Townsend III

For people looking to be on the same network as their computer I suggest Tailscale. Very user friendly VPN software that makes anywhere your home network (or work network or wherever you decide to install it.) Great for Home Assistant installs as well!

Collapse
 
inthevortex profile image
Angsuman Ray

Hey, it will sync over the internet once pairing is done. If you have explicitly asked for your own relays, then you will have to setup one but the general public relays work fine. But obviously slower than intranet. I use it to sync my Obsidian vault across devices and also backup my code to my home server.

Collapse
 
cloudburst profile image
Cloudburst (Leah) • Edited

I was unaware Syncthing had public relays, I have to admit I haven't looked too much into it's documentation and was going of my experience with it (I just installed it and paired stuff :p)

I'll have to look at the documentation more, since I'm going on holiday in 2 weeks time and having files still sync will be mighty helpful

Collapse
 
jonte profile image
jontstaz

What I've been using recently on devices other than my main PC is Google's IDX. It's essentially VSCode in the cloud and it allows you to connect your Github account and then stands up a complete dev instance, complete with web server, iOS and Android live preview, full shell environment, etc. It's actually super useful and it's free (at least for now).

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Nice

Collapse
 
thraize profile image
Gamerxville

Currently working on a fork of the already popular Acode mobile code editor meant to be the vscode for mobile 😁

You can download the beta apk from the actions tabs from my github

It also comes with a nodejs backend and termux integration out the box, currently working on the plugin api

github.com/7HR4IZ3/Acode

Collapse
 
ant247 profile image
Ant

So a paid for version of an open source app. With who knows what added code.
That gets you to login with your GitHub creds.

Hope you have 2FA.

Collapse
 
corscheid profile image
Corey Scheideman

yeah oof, whoever posted that app to Google Play is outrageous. And Google is outrageous for letting it slide past review. This app should probably be mass reported if it hasn't already been. I feel for all the excited innocent souls like OP

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

It appeared to be safe but I have since uninstalled it and reset everything. Gonna try the other method one more time. Thanks for you feedback.

Collapse
 
kurealnum profile image
Oscar

I didn't know that you could get VSCode (or any editor, for that matter) onto a mobile device lol. Do you have a keyboard that connects to your phone?

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Typed on an android phone with USB keyboard

Hey Oscar! I just checked that out just for you, and YES! You can connect your keyboard. I connected my keyboard with a USB-C and bam it just worked automatically. Pretty cool. I'm actually considering switching to one of those wider z-flip phones to have a bigger phone display for coding! excitement

Collapse
 
kurealnum profile image
Oscar

This is wild. You have a full on coding setup without a laptop or desktop in sight xD

Thread Thread
 
annavi11arrea1 profile image
Anna Villarreal

The future is here! haha

Thread Thread
 
annavi11arrea1 profile image
Anna Villarreal

Paired with one of those roll-up or projection keyboards it's full-on pocket techie mode! XD. Now, to be FAIR, it doesn't have the same feel as being surrounded by several monitors and a real keyboard. But hey, it's still pretty awesome.

Collapse
 
israaali profile image
Israa

That's awesome to hear! I'm curious, what type of keyboard did you connect to your phone? I'm looking for one that's compact and easy to carry around too. Any recommendations?

Thread Thread
 
haaikraai profile image
haaikraai

I had such a setup as well because of all the power outages in this country. Android is full-on on-board with USB keyboards. It defaults to hiding the virtual keyboard and have shortcuts for home and back and other buttons. Use Bluetooth or a USB multi-adapter hub thingy (I don't know the technical term tbh) to add a mouse too if tou want

Personally I did experience I tiny bit of latency, but not enough to investigate the real source. The quick flip from portrait to landscape is one of my favourite "features" - that's just not something I've successfully done with a 17" monitor that still works to support my claim

Thread Thread
 
israaali profile image
Israa

Thanks for sharing your experience! It sounds like a versatile setup. I appreciate the insight on using USB keyboards with Android. The quick flip from portrait to landscape does sound handy! Just to clarify, when you mentioned the quick flip, were you referring to the Galaxy Z Flip5? I've been considering it for coding on the go, but I'm a bit worried about potential repair costs for Samsung parts. Any thoughts on that?

Collapse
 
hlzn profile image
Hugo Lozano

Yes! I was excited about coding on the go as well :) That was my main motivation for going with the z phone, I use the web version connected to my GitHub repos and my local computer thru tunnels, the fun thing is that while using the tunnels you can run backend applications (dotnet in my case) and test them in the phone
Image description

Thread Thread
 
annavi11arrea1 profile image
Anna Villarreal

sounds like using the zphone has been a positive experience for that!

Collapse
 
nineoneone profile image
Since™️

I totally get the excitement of using a dedicated app as vscode on mobile device.

I don’t see the particular app your are referring to but there are few recommendations available on playstore:

  1. Vscode by DevEnvironments
  2. Acode - code editor | FOSS | by Foxdebug
  3. deVStudio by UserLAnd Technologies

For iOS/iPadOS devices, most of the options are already mentioned, but you can also try this:

  • Setup and leave a code-server tunnel instance running on your android and use that with iOS/iPadOS devices.
Collapse
 
annavi11arrea1 profile image
Anna Villarreal • Edited

This is the particular app i had downloaded but now uninstalled due to a few questionable things: https://play.google.com/store/apps/details?id=dev.environment.VScode_PaidR1&hl=en_US&gl=US

Collapse
 
nineoneone profile image
Since™️

yes, The first one from my list?

What was the concern? the codeserver location?

Collapse
 
instalab profile image
Samuel Boczek

And if you have Samsung with Dex then you get full desktop experience, don't even need a laptop anymore. But as others mentioned, pleeeease refund the app if you still can. This dude is scam, shouldn't be allowed to charge for an app he did not even build. It will probably be be pulled out eventually anyway.

Collapse
 
corscheid profile image
Corey Scheideman • Edited

Also for those who did not know,

not only is vscode.dev a thing, but so too are

  • github.dev
  • github.dev/{user}/{repository}
    • example: github.dev/github/dev

which is a very convenient way to be on chrome looking at a GitHub repository, and to open it in a browser VS Code, all you do is change the .com to .dev and boom, VS Code, open to that repo. Most useful on one's own repos, but if it's someone else's, I believe it creates a fork for you to edit and commit on.

github.dev (GitHub Codespaces) can also be installed as PWA in the same way as vscode.dev

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