Work with Others Using Live Share in VS Code
Visual Studio Live Share supports remote pair programming, reviews, shared debugging, chat, and terminals without requiring collaborators to clone or configure the project.
Transcript 7 topics
Remote collaboration needs
0:00Whether that's a peer review process or peer programming, peer programming. My name is Michael Jolley and I'm the Bald Booted Builder. Let's talk Versus Code Extensions. One thing the environment we're in has taught us is that we need better ways to work remotely.
We can't have peer reviews or paired programming or paired debugging sessions with the person in the cubicle next to you or the office next to you. So we've got to figure out how to do those things better remotely.
Live Share overview
0:40And that's where today's extension comes in. We're gonna talk about live share from Microsoft. But before we get into it, let me remind you that if you enjoy hanging out with other developers and writing code, cutting up and having fun and just encouraging each other, join us on Twitch. We stream there live 2PM Eastern, Tuesday, Wednesday, and Thursday at twitch. Tvbaldbeardedbuilder.
So what's so great about Live Share? Well, it allows you to work collaboratively with other developers. So whether you're debugging together or pair programming or doing peer reviews, all those sorts of things you can do through Versus Code without them having to do a clone or a fork of a repo and do all that kind of stuff. So what exactly do you mean? Well, imagine being able to load the code yourself and someone else being able to see your code, see where you are, what line your cursor's on without ever having to get that code.
So they don't have to pull down that repository and go through all the setup, no NPM installs, none of that stuff. They can just watch you work as if they're sitting there with you and not just sharing your code, but also sitting there during debug sessions or using your terminal even voice chat, text chat, all of that is included in the live share extension. So how do we install it?
Installing Live Share
2:01As always, I've left a link in the description for you to go check it out if you wanna read more. The easiest way is to click that extensions button in Versus Code, search for live share and then click the install button. Once it's installed, it's gonna ask you to log in with either your GitHub or your Microsoft account. That's so that when you're sharing a session with someone else, it can identify you because it's gonna highlight your cursor with your name beside it. That way everyone in the session can know who is where and what they're doing.
So once you've got it installed, you can click on the live share link down in the status bar. It'll let you start up a new collaborative session and copy a link.
Sharing collaborative sessions
2:40You can then share with others to join your session. So you can send that via Slack or Teams. They can click on it and a load up Versus Code on their end with your code running there. Once they join, you'll see a notification and you'll start to see their cursor and their name next to it. And you can see actually over in the live share panel, what file they have open, what line number they're on.
One of the nice things about it is when they join, initially they'll be following you. So as you move through pages or through lines, they're following along with you until they decide to break off and go somewhere else. That's really nice because you can give them sort of a guided tour when they've initially joined and then they can get really down in the weeds and start helping you make something better. One of the things that's nice is that users can not only see where you are, but they can also peruse your code as if they hadn't installed locally.
Debugging together
3:37So when they're trying to debug something for you or help in some way, they can click around as if the code had been downloaded locally to their machine. And then when you start a debug session, wow, the control you get and the control they get is staggering. They can actually set breakpoints when you're debugging that will be hit locally on your machine. What's fantastic about that is it looks like it's being debugged on their machine. And when it breaks on a certain line, they have access to local variables just like you do.
When you mouse over something and see its property or its value, they can see the same thing. They can, they don't even need you to do it. They can mouse over it themselves and see it locally. One thing that's handy is that text chat is built into the extension by default.
Chat and terminal sharing
4:22So you have a session chat, which is everyone who's in the conversation, everybody who's in the session, see that you can talk back and forth to kind of explain what you're looking for or explain a problem. And then individually you can chat privately to describe something if you just need more of a one on one type of thing. One of the most powerful features of this is the fact that you can share your terminal. It's maybe a blessing and a curse. Well, maybe that's a little strong.
It's very powerful. It can really help or really harm you. You need to be careful because when you share your terminal, can And it doesn't matter what terminal, whether it's PowerShell, Bash, whatever, you can share that and the other person will see it on their end and you can give them access either in read only or rewrite. Of course, the dangerous part is read write because it's a live terminal on your machine. So if they, you know, RMRF something, you won't appreciate that.
So be careful who you give write access to because they're gonna have full control. One of the neat little add ons, it's not contained in this extension itself, but you can get the live share audio extension.
Voice chat add-on
5:32It's basically a plugin that adds voice chat, which is super nice. So instead of having to text chat back and forth in the application, you can actually just talk to each other and it's all included as part of the extension, it's completely free. It makes communicating a lot easier. You'll definitely wanna try that out when you download this extension and pair program with someone because using their mic, you can just chat back and forth, makes it a lot faster to develop and to debug and do whatever peer reviews, all of it. Hopefully you're kind of more interested in this extension if you're not already using it.
If you are using it, I'd really love to know how you're doing it. Are you doing peer reviews through it? Is it pair programming? Let me know in the comments below. I really love learning how people use these sorts of tools.
If you like these kinds of videos, be sure to subscribe and hit that bell to know when we release a new video. And then also please like this video if you enjoyed it. It makes my day, makes me super happy. And I'd love to chat with you more in the comments or in our Discord.
Feel free to join that as well. Until next time.
Sign in to join in. Reading needs nothing.