IntelliJ IDEA 2020.2 Help

Getting started with Code With Me

With IntelliJ IDEA, you can use the Code With Me plugin that enables you to share your locally running project with anyone.

You can use Code With Me for real time collaboration, editing code, sharing a server, and running a debugging session.

A Code With Me shared session involves the interaction between a host and one or more guests.

You can start a session with one of the following basic scenarios:

  • You can do pair-programming, in this case you share your IDE with a single participant and either use the Full sync mode, or follow each other and collaborate on different parts of code. Unlike classic pair-programming where developers share a single screen and a keyboard, you can work independently and achieve the goal faster.

  • You can have a teacher-students scenario where you have many participants who follow you. Let's say you need to explain a problem and show your team members different parts of your project. You can achieve that with the Force Others to Follow You mode.

  • You can do simultaneous multi editing of your code with other participants. In this case, participants can quickly change the code and even work on other files of the project at the same time. However, there is a limitation on how many participants can actively type together. The limit is 5, and if it's reached, IntelliJ IDEA will display a popup suggesting to wait. Additionally, it might slow down the performance.

Get started as a host

You can create a link to invite other participants to collaborate on your code using your computer as the host. You can also start a debugging session, share its state and actions.

Create a session

  1. Install and enable the Code With Me plugin.

  2. On the main toolbar, click the Code With Me icon.

    Alternatively, from the main menu, select Tools | Code with Me.

  3. In the list that opens, click Enable Access and Copy Invitation Link.

    Enable Access

    IntelliJ IDEA creates a link that you can send to guests you want to invite to collaborate.

  4. Send the link to guests. When a guest clicks the link, IntelliJ IDEA displays a popup suggesting either to accept or decline the guest.

  5. Click Accept. The guest joins your session and you can start collaborating. You will see an additional caret at your editor and an icon on the main toolbar indicating the active guest. Up to 20 guests can join your session. However, we suggest that you allow only up to 5 participants to edit your code simultaneously. Allowing more than 5 active participants might affect performance.

Terminate an active session

  1. On the main toolbar, click the Code With Me icon.

  2. From the list that opens, select Turn Off Access and Disconnect All.

    Turn Off Access

    IntelliJ IDEA terminates the session and disables all the guests. The link also gets disabled, and you need to create a new one to start another session.

Join another IDE as a participant

  1. On the main toolbar, click the Code With Me icon and choose Join Another IDE as Participant.

    Join another IDE
  2. In the dialog that opens, add the received link and click OK. After you are accepted, you can join the shared session on another IDE.

Get started as a guest

As a guest, you can follow a host during the created session and edit the code on which the host is working. You can also follow other session participants and get access to other parts of the project. Moreover, you can run and debug code on the host's machine, and work in the terminal tool window.

Accept an invitation

  1. Click the received link.

  2. IntelliJ IDEA installs a lightweight version of IntelliJ IDEA.

    You don't need to additionally install IntelliJ IDEA to enable the lightweight version.

  3. Once it is installed, IntelliJ IDEA displays a notification suggesting that you wait until the host accepts your request to join the session. When you are accepted, you are able to join the session. When the host’s project gets opened, you will see the active file in the editor.

    At this point, you can customize the guest IDE to make your working process more convenient. You can change themes, view modes, and so on. The changes you make will only affect your guest IDE.

Leave a session

  1. On the main toolbar, click the Code With Me icon.

  2. From the list that opens, select Disconnect and Close Project.

    Disconnect and close project

    The session is terminated and the Code With Me welcome screen is displayed. You can quickly return to the same session without any accepting process from the host using the same link.

    Code With Me welcome screen

Work in a shared session

Once a shared session is created and all invited participants are accepted, the editor will contain the additional carets, and the main toolbar will display the guests' icons.

Joined session: editor and the main toolbar

In a shared session you can try different things such as move around the host's project independently, follow other participants, use the terminal tool window, make code edits, and so on.

Follow a participant

  1. On the main toolbar, click the Code With Me icon.

  2. From the list that opens, select the name of the participant you want to follow and select Follow.

    Alternatively, on the main toolbar, click the needed participant's icon.

    IntelliJ IDEA places your caret at top of the participant's caret and places a frame around the editor with a small label displaying the name of the participant you are following.

    Following other participant

    Click Stop next to the name to unfollow the participant.

    You can have more than one participant following other participants. When one of the followers decides to switch focus, it will not affect the main host. This is helpful in the teacher-students use case.

Force others to follow you

  1. On the main toolbar, click the Code With Me icon.

  2. From the list that opens, select Force Others to Follow You.

    Select Force Others to Follow You

    In this case, all the guest carets are placed on top of the host, and the focus will switch if the main caret is placed in the other files of the project.

    Force Others to Follow You: editor

    At any time, a participant can stop following the main caret.

Jump to other participant

  1. On the main toolbar, click the Code With Me icon.

  2. From the list that opens, click a name of the participant and select Jump To.

    Alternatively, on the main toolbar, right-click the participant's icon and select the same option.

    Jump to Other Participant

    The caret is placed on the line where the selected guest's caret is located. This might be helpful if you want to quickly locate a certain participant's caret.

Use the full sync mode

  1. On the main toolbar, click the Code With Me icon.

  2. From the list that opens, choose the name of a participant and select Full sync mode.

    Alternatively, on the main toolbar, right-click the participant's icon and select the same option.

    Select Full Sync Mode

    The caret is placed on top of the host's caret. IntelliJ IDEA places a frame around both the host's editor and the guest's editor indicating that the full sync mode is on.

    Full Sync Mode
    The focus stays within the host caret even if the caret is placed in other parts of the project. This mode is usually used in the pair-programming scenario.

Terminate a shared session for a specific user

  1. On the main toolbar, click the Code With Me icon.

  2. From the list that opens, click a name of the participant for whom you want to terminate the session and select Kick user.

    Alternatively, on the main toolbar right-click the participant's icon and select the same option.

    Kick User

    IntelliJ IDEA terminates the session for the selected participant and displays a notification on the guest's side. IntelliJ IDEA closes the guest project and returns the guest to the Code With Me welcome screen.

    Welcome Screen

    If the guest wants to return to the shared session, they need to wait for the host permission to join.

Collect Logs

  1. On the main toolbar, click the Code With Me icon.

  2. From the list that opens, select Collect Host and Client logs.

    Collect Host and Client logs

    IntelliJ IDEA creates a log file on your local machine. The log file contains the current project's filenames, parts of code, and detailed information on guest's activity such as caret movements, typed symbols, invoked actions, files opened, file paths, and so on.

Change the session name or URL of the session server

You can change the default name of the created session using the Code With Me settings.

You can also change the URL of a lobby server used for a session. It might be useful to switch to your own company's server for security purposes.

Access the Code With Me settings

  1. In the Settings/Preferences dialog Ctrl+Alt+S , go to Code with Me.

  2. In the User Name field enter a new name for your session. The session name will be changed on the restart. Clicking Use System name will reset the session name to the default one.

  3. Click OK to save the changes.

Last modified: 19 November 2020