I saw a demo of Visual Studio Live Share last year and thought it looked pretty cool. If you are not aware of what it is, it allows you to collaborate on code projects with other developers without the need for some kind of screen sharing solution.
I work remotely in a development team and we often use screen sharing solutions to assist or get assistance from each other, demonstrate what we’ve been doing or just bounce some ideas off of someone else which can often help you get past problems when you are not physically sitting near your colleagues. Screen sharing solutions typically fall down in a few scenarios though:
- When working on different projects, but seeking help from someone with particular technical knowledge and they don’t have your code in front of them.
- Avoiding the “Try this…..hmmm maybe try that……or how about this….”, when the person making the suggestions has to talk you through making some changes
- The “Can I take control of you screen?” scenario which never seems to work that great
- Being able to both make code changes to the same code project at the same time
Earlier this year I was able to get into the Private Preview for Visual Studio Live Share and give it a trial run. What it essentially lets you do is take your code project in Visual Studio or Visual Studio Code, share that project with a colleague just by giving them a web link and then collaborate on the same code in real time.
I suggested trying it out with a couple of colleagues instead of using our screen sharing solution and fairly quickly it has become the solution we default to using since it has provided a great experience already, even while in Private Preview.
Visual Studio Live Share is now in Public Preview, so anybody is able to test it out. I’m going to demonstrate with Visual Studio Code rather than Visual Studio, but both provide a similar experience.
Get the latest version of Visual Studio Code and install the VS Live Share Extension:
Then you will either be promoted to sign in or you can click the sign in button in the bottom left corner of VS Code. You’ll be prompted to use either a Microsoft Account or your Github account:
Once signed in, click the Share button:
You’ll shortly be prompted that a sharing link has been put on your clipboard:
Pass this to the person you want to share the session with. On their system they need the same requirements, i.e. Visual Studio or Visual Studio Code installed, the VS Live Share extension and signed in with one of the above accounts. Then simply click the link sent though and you’ll get notification of a collaboration session starting:
Note: You can even mix and match between the two editors, you don’t both have to have the same one.
The sharer then gets a Live Share workspace opened with the entire code project viewable and editable without having to setup anything on their system, or clone the same repository:
The initial feature we have mostly used is being able to show each other different files within the project and make live changes together. By clicking on the Pin icon you will automatically follow where the other person is as they move from file to file, and also within a file. You’ll see a coloured icon with the person’s name you are sharing with to indicate where they are in the file.
This had been fabulous and has really made a significant difference at times when needing to troubleshoot code with a fellow remote worker.
One thing we were missing though was being able to use a shared terminal. It was great to be able to edit code together, but then we had to fall back to screen sharing to see what was happening when it was run. So I contacted the Progam Manager Jon Chu to see if it could be a feature that would go on the roadmap - to my surprise he informed me that it was already in development and in-fact was already available as an experimental feature!
You can start sharing a terminal by clicking on the session state status bar item and choosing Share Terminal:
You get the option for a read-only or read/write shared terminal:
The shared terminal will then be available on both systems and in this case you’ll see its labelled as ‘ps shared’
For us VS Live Share has been so good, it’s something we’ve already come to rely on and it’s still only in Public Preview. It gets updated regularly, so I’m confident it’s only going to get better. I encourage you to try it out with your co-workers and provide feedback.