What if you could take your dev machine something like
this, and turn it into a development server - something that
you could access from anywhere? Today I'm going to give
you a sneak peek at something that we've been working
on for the past few months that does exactly that,
and then I'm going to tell you what you can
do today to get early access to something called VS Code Server.
Now this desktop that I showed you is the
kind of power that every dev wants, and I built
it that way. It's got 16 cores.
32 gigabytes of RAM and honestly not nearly enough LED's.
This is where I'm going to install VS Code Server. The
VS Code Server is a command line program that you install
in your terminal using one command. Now once the server
has been installed we can start it with code-server.
This is going to ask us to agree to a
license agreement. Ask us about some telemetry and then it's
going to ask us to log in. The log in
is important because that's what helps us securely.
Access this from anywhere. Now. Once I log in, it's
going to ask me to name this machine, let's call
it lead leet-led. Look, naming things is hard. Now we
get a URL in the terminal and if we click
on this URL we get VS Code running right in the
browser. Now this is not a website that looks like
VS code. This is actually full VS code running in
the browser. You may have seen this before - something called
vscode.dev that we released many months ago.
The big difference now is that if I open the
terminal, I've got a terminal and it's the terminal from
that huge desktop back there. For instance, if I run
htop here in the browser, we can see those 16
cores and 32 gigabytes of RAM that we now have
full access to. So let's work on something. Here I'm
going to create a new folder from the terminal. Then
I'm going to click the open folder button and you'll
see that I'm able to browse the file system from
that desktop and there's that new folder that I just
created. So let's open that.
Then we'll go ahead and add a new file and
let's write some Python And then, because I have Python
installed on that desktop, we can run it right here
in the browser.
Now all of this is made possible by a secure
tunneling service provided by Microsoft. There's no SSH for you
to set up. You don't have to worry about port
forwarding, we handle all of that for you. All you
have to do is install and run the VS Code Server.
And because we have this secure tunneling service, this means
that we can safely and securely access this dev machine
from any device with an Internet connection and a modern
web browser. Any device. Like, this iPad.
Now let's take a look at the URL here, because
the URL is important, it has the name of our
machine leet-leds and then it has, after that, the
path to the folder that we have opened. So we
can just take this URL, open it on the iPad
in Safari and we'll get this same project loaded up
right in VS Code. Let's open up something a little more
complicated though. Now we could go and open up another
local folder, but let's try something else. Instead, we could
clone from GitHub. Now we could do this from the
terminal as we normally would.
Or we can do it from VS Code. Again, we're
coding as if we are local because we essentially are.
This iPad is basically a portal back into the desktop
machine. Now this application is a Node CLI app, so
let's go ahead and bring that down and we'll open
it and we can run it here in the terminal.
But because we have full VS Code, we can run
it and attach the debugger, set a breakpoint and we
could hit that breakpoint - debug right here.
On an iPad. In the browser. But this doesn't look
like my VS Code. We have a solution for that
and it's called Settings Sync, so let's go ahead and
turn that on in the browser. And when we do
that, my theme, my icons, my extensions, my layout, everything
that I love about VS Code is now on an
iPad in the browser so that VS Code, my VS Code
is always my VS Code, no matter where I'm using it.
If I haven't mentioned it yet, this is full VS
Code, so we can do things like install extensions.
Like say Docker and now we can view all of
the containers and images that we have on my local
desktop machine. We can run them, we can build them,
we can inspect them, we can even interactively interact with
them here in the terminal, in the browser, and vscode.dev is a progressive web app, so we can
go ahead and add that to the desktop of this
iPad, so it's just easier to find and get back
to later. So you can see the potential here.
We've got a lot more planned and there's a lot
more coming. It's still
early. For now, check the link in the description below
this video for the blog post on how you can
sign up to get early access to the VS Code
server, but we want to know if you had the
ability to code from anywhere, what would you use? Would
do it on a Chromebook? Would you use a fridge?
Would you use it as an excuse to build a machine with way too
much power and far too many LEDs? Let us know
in the comments below. Happy coding.