Pair programming is a methodology in which two or more developers work together on the same task. One, writes code while the others review each line of code as it is typed in. Pair programming is used to develop software collaboratively in an environment where programmers can share their knowledge and expertise. This technique has been proven to increase productivity and code quality and has been used by the best companies.

This article talks about everything you need to know about pair programming with VS Code and your team. From installing and configuring VS Code for pairing to set up your environment just right and the tools you could use to have the most productive pair programming sessions. We’ve got you covered.

How to do pair programming with VS Code?

VS Code is an open-source code editor from Microsoft that runs on Windows, macOS, and Linux. Today is the most popular IDE and has built-in support for JavaScript, TypeScript, Node.js, JSON, CoffeeScript, Python, PHP, C#, F#, CoffeeScript, Kotlin, and many other programming languages.

VS Code also has a huge community of extensions that provide additional functionality like debugging tools, integration with GitLab or GitHub, and naturally pair programming. If you are interested in discovering more useful extensions, be sure to check the list of the best extensions for VS Code.

For pair programming, we are looking for tools that will provide this specific features:

  • real-time code sharing;
  • a way to chat with text, audio, and video;
  • server sharing;
  • terminal sharing.

What tools can I use for pair programming with VS Code?

To be able to do pair programming and have the features listed above, you basically have three options when using VS Code.

  1. You can use Live Share an extension built by Microsoft that allows people that only use VS Code to do pair programming with each other. Live Share only works with people that are using VS Code, so if your colleague is using PyCharm or WebStorm you couldn't do pair programming with them. Another issue to have in mind is that you need to install different extensions to be able to talk while pair programming as Live Share doesn't provide an audio channel out-of-the-box .
  2. You can use a remote desktop sharing tool that shares your screen and allows your colleagues to have remote access to your mouse and keyboard. You could use Teamviewer, Tuple or Coscreen for this. Being a native app, you need to first be sure that it supports your OS and give access to the tool to control all your machine. Another detail to be aware of is that with these tools everybody is always following one person. You are going to be seeing your colleague's screen and you can't be working in parallel. This can limit the experience that you have when pair programming.
  3. The third (and our favorite) option is Duckly. It enables you to share your code in real-time so you can do pair programming with people using any IDE. You can collaborate and do pair programming with VS Code while your colleague are using PhpStorm, IntelliJ or anything else. Duckly also has terminal sharing, video, and chat features, so you can talk and collaborate with each other without installing multiple extensions.
Pair programming with VS Code
Pair programming with VS Code

How to share code in real-time?

We are going to show you the steps for installing and using Duckly for pair programming with VS Code because we believe this is the most complete and best tool for the job. Maybe we are biased because we built it or maybe it's really good anyway. :)

For starting pair programming with VS Code you need to install Duckly on VS Code. You can do that by searching Duckly on the VS Code marketplace.

After you installed the extension you'll need to login to your Duckly account so VS Code can know when you are ready to share your code with other developers. Once you join a call on Duckly, you will be able to share your code directly from your VS Code. You can share your whole workspace, just a specific folder or file.

Once you start sharing your code, your colleagues that join the call on Duckly will be able to code with you in real-time directly from their IDE of choice or from the web. You can highlight each other code, type together, follow or even work in parallel in different files.

How to share a server when pair programming

On the Duckly extension you can see the option to share your server. By clicking there Duckly will list all your ports and you can select what ports you'd like to expose publicly. Duckly will then create a public link that you can share and that any person can access. You can always easily revoke the link or share a different port with your colleagues.

How to do pair programming with people using different IDEs?

Duckly supports many IDEs, so doing pair programming with VS Code and other IDEs is easy. Any developer that joins your coding session can follow your code and do pair programming with you. They can do that from the Duckly web IDE or directly from their IDE of choice. Duckly currently supports several IDEs like VSCodium, IntelliJ, WebStorm, Android Studio, and more. Check the complete list of supported IDEs.

Once you are pair programming with other developers, you can share any file and they will be able to see and collaborate it in real-time with you. One important detail is that everybody doesn't need to be using VS Code. People can do pair programming using their favorite IDE. You can do pair programming with VS Code and collaborate with people using IntelliJ, WebStorm and more.

Pair programming with VS Code is easy

via GIPHY

Pair programming is a great way for developers to learn from each another. This methodology has been shown to improve productivity and quality because it provides more viewpoints on the problem being solved while also improving team communication and collaboration.

Extensions like Duckly make pair programming with VS Code easy. It has real-time collaboration, terminal sharing, server sharing, and everything else that you need to start programming with your team. Last but not least, you can even do pair programming with people using different IDEs and not be limited to collaborate with people that only use VS Code.