This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge

This article summarizes the connectivity requirements for Visual Studio Live Share, available connectivity options, and known workarounds when applicable.

Sign in

You can sign into Live Share using any Azure Active Directory backed work or school account, a Microsoft account , or a GitHub profile . Typically sign-in URLs for these are open in most organizations given the number of public facing products that use them, but if not, contact your network administrator about opening up login.microsoftonline.com and/or github.com in addition to the domains listed below .

On-prem AD (ADFS) accounts and on-prem GitHub Enterprise accounts are not currently supported (up-vote 👍) .

Connection modes

To ensure optimal performance, by default Visual Studio Live Share automatically detects whether a collaboration session host machine and guest machine can communicate directly over a network and only relays via the cloud if there is no route between them. This mixed "auto" mode is flexible and even allows some guests to relay through the cloud while others connect directly for the same session.

The direct connections are authenticated via a cloud based mechanism to ensure security but require a port between 5990 and 5999 be opened to enable the connectivity. As a result, when sharing for the first time your desktop firewall may prompt you open a port. Accepting this is optional as ignoring it will simply cause Live Share to always use the relay when in auto mode.

All connections in Visual Studio Live Share are SSH or SSL encrypted and authenticated against a central service to ensure that only those in the collaboration session can gain access to its content. In addition, Live Share's cloud relay does not persist any traffic routed through it and does not "snoop" the traffic in any way.

Changing the connection mode

If you would prefer to disable direct or relayed connections or are simply troubleshooting connectivity problems, you can force other connection modes.

Host Behavior Guest Behavior The host's collaboration session accepts secured, authenticated direct connections or cloud relayed connections. Attempts to use a direct connection and falls back to relaying through the cloud if this fails. Direct The host's collaboration session only accepts authenticated, secure direct connections. Attempts to use a direct connection and stops if it cannot connect. Relay The host's collaboration session does not allow direct connections. No port is opened on the host's machine. Always connects via the cloud.

To change the mode:

  • Go to Tools > Options > Live Share.
  • Select the mode from the "Connection Mode" dropdown.
  • Restart VS.
  • VS Code:

  • Edit settings.json (File > Preferences > Settings).
  • Set "liveshare.connectionMode" to "auto" , "direct" , or "relay" depending on your preference.
  • Restart VS Code.
  • Requirements for connection modes

    The connection mode you are in will dictate the specific ports and URLs that need to be available for Live Share to function.

    Client Access Requirement Troubleshooting Outbound access to *.liveshare.vsengsaas.visualstudio.com:443 . Ensure your corporate or personal network firewall allows you to connect to this domain. Enter https://visualstudio.microsoft.com/services/live-share/ in a browser and verify you land at the Visual Studio Live Share home page. You may also be running into proxy issues that need to be resolved. Any (VS Code) Outbound access to download.microsoft.com:443 . Ensure your corporate or personal network firewall allows you to connect to this domain. You may also be running into proxy issues that need to be resolved. Auto-switches. See direct and relay modes. Switch to direct or relay mode to troubleshoot. Direct Hosts: A port in the range 5990 - 5999 needs to be opened to accept inbound local network connections.

    Guests: A network route and outbound access to the host on this same port. Verify "vsls-agent" (for VS), "code" (for Visual Studio Code) or "code - insiders" (for Visual Studio Code Insiders) is not blocked by your desktop firewall software for this port range and that you can ping one another. While Windows and other desktop software should prompt you the first time the agent starts up, we have seen instances where group policies prevent this from happening and you will need to manually add the entry . You may also be running into proxy issues that need to be resolved. Relay Outbound access to *.servicebus.windows.net:443 . Ensure your corporate or personal network firewall allows you to connect to this domain. You may also be running into proxy issues that need to be resolved. Outbound access to *.online.visualstudio.com . Ensure your corporate or personal network firewall allows you to connect to this domain. Enter https://sts.online.visualstudio.com/api/swagger/index.html in a browser and verify you land at the swagger page. You may also be running into proxy issues that need to be resolved.

    Manually adding a firewall entry

    As outlined above, direct mode requires that your personal firewall allow vsls-agent , code or code - insiders to accept connections in the port range 5990-5999. If you want to use direct mode but have found that your firewall does not have vsls-agent entry, you can add it manually. How you do this will vary by firewall software, but you can find information about configuring the Windows Firewall here .

    If you do not see an entry for vsls-agent, you can find the agent executable in one of the following locations.

    VS Code install location

    When configuring the firewall manually for VS Code or VS Code Insiders on Windows, MacOS or Linux, use the path to the VS Code app install location.

    Ex: Windows (default install location)

  • %applocaldata%\Programs\Microsoft VS Code\code.exe
  • %applocaldata%\Programs\Microsoft VS Code Insiders\code - insiders.exe
  • Visual Studio agent location

    The Visual Studio location is more dynamic, but you can follow these steps to find the executable:

  • Navigate to your Visual Studio install location. This is typically C:\Program Files (x86)\Microsoft Visual Studio\EDITION where EDITION is Community, Enterprise, etc

  • Run a search for vsls-agent.exe in under the IDE\Extensions sub-folder.

    Unfortunately you may need to do this step each time you update Visual Studio Live Share.

    Proxies

    Visual Studio Live Share currently has some limitations around proxy use. While automatic proxy settings should work on Windows, when using macOS or Linux (and with certain proxy configurations on Windows) the HTTP_PROXY and HTTPS_PROXY environment variables will need to be set globally for VS or in Application > Proxy settings for VS Code.

    Note: if the proxy is not configured in VS Code's Application > Proxy settings it will also be inherited from the http_proxy and https_proxy environment variables.

    If your proxy doesn't automatically set these for you, you can manually set the variables in the following form:

    HTTPS_PROXY=http://proxy-ip-address:proxyport

    If you have an authenticating proxy, you can add your user and password as follows:

    HTTPS_PROXY=http://user:password@proxy-ip-address:proxyport

    If these settings don't solve the problem for you, please let us know the specifics of your proxy setup so we can take a look at improving support.

    See also

  • Install and sign in to Live Share in Visual Studio Code
  • Install and sign in to Live Share in Visual Studio
  • Security features of Live Share
  • Having problems? See troubleshooting or provide feedback .