Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & Accessibility Testing

Enable Local Testing with Live

This guide shows you how to set up Local Testing with BrowserStack Live.

Introduction

If you are using the Chrome or Firefox browsers to launch a BrowserStack Live session for the first time, you see a prompt. In this guide, you learn about setting up basic Local Testing for your environment.

To verify whether you have already enabled Local Testing for Live sessions, launch a Live session and on the Live toolbar, look for the green indicator near the Local Testing option.

Live with Local Testing turned on

If the Local Testing indicator is red, or you are using Local Testing with Live on a different browser/OS, follow the setup instructions to enable Local Testing for your Live sessions.

Enable Local Testing

Select the OS and browser that you are using to access BrowserStack Live.

Important: This is the OS & browser that you are using to access BrowserStack Live, and NOT the browser you are going to open and test using Live.

Follow the setup instructions for your OS:

Step 1: Search for the BrowserStack Local app on your system. If you have the app installed, Local Testing is enabled for your Live sessions. There is no additional setup required.

If you do not have BrowserStack Local app on your system, download the app from the following link:

Download the BrowserStack Local app

Step 2: Start the BrowserStack Local app.
You see the BrowserStack Local icon in your system tray:

BrowserStackLocal Windows App Icon in system tray area

Local Testing is enabled for your Live session.

Step 3: Launch a Live session and look for the green indicator near the Local Testing option on the Live toolbar.

You can also launch a Live session from the BrowserStack Local app. On the system tray, click the BrowserStack Local app icon > Launch > Live.

Launch Live session from BrowserStackLocal Windows App

To resolve all requests to local URLs through your system:

  1. On the Live toolbar, click Local testing.
  2. On the Local Testing prompt, in the General section, click the Resolve all URLs through my network checkbox.
    For example, if there is a URL abc.com that is restricted to your network, or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment, enabling this option resolves all abc.com requests from a remote browser or mobile device through your machine.

Resolve all URLs through user network

Step 1: Download the BrowserStack Local binary for Windows.

Note: The download links are secure. The binaries are digitally signed, identifying the publisher as BrowserStack Ltd.

Step 2: Unzip the file to a folder/directory on your system, open the command-line interface, and navigate to the folder containing the Local binary.

Step 3: Run the Local binary using the following command:

BrowserStackLocal.exe --key YOUR_ACCESS_KEY
Important: If you have an M1 Macbook and get the error zsh: bad CPU type in executable: ./BrowserStackLocal while running the binary, please install Rosetta and then re-run the binary.

Local Testing is enabled for your Live sessions and screenshots. To verify, launch a Live session on your browser and near the Local Testing option on the Live toolbar, look for the green/red indicator that indicates whether Local Testing for your session is enabled/disabled.

Enable local testing and screenshots for live sessions

To resolve all requests to local URLs through your system, establish the Local Testing connection with a --force-local flag, as follows:

BrowserStackLocal.exe --key YOUR_ACCESS_KEY --force-local

For example, if there is a URL abc.com that is restricted to your network, or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment, enabling this option resolves all abc.com requests from the remote browser/mobile device through your system.

Note: To set up Local Testing for other environments/network configurations, refer to our complete list of flags. For Local Testing setup in common network configurations, refer to Use Local Testing with Live.

Step 1: Search for the BrowserStack Local app on your system. If you have the app installed, Local Testing is enabled for your Live sessions. There is no additional setup required.

If you do not have BrowserStack Local app on your system, download the app from the following link:

Download the BrowserStack Local app

Step 2: Click BrowserstackLocal.pkg and install the app.

Step 3: Start the BrowserStack Local app.
You see the BrowserStack Local icon on the menu bar at the top of your screen:

BrowserStackLocal macOS App icon in Menu Bar

Local Testing is enabled for your Live session.

Step 4: Launch a Live session and look for the green indicator near the Local Testing option on the Live toolbar.

You can also launch a Live session from the BrowserStack Local app. On the menu bar, click the BrowserStack Local app icon > Launch > Live.

Launch Live session from BrowserStackLocal macOS app

To resolve all requests to local URLs through your system:

  1. On the Live toolbar, click Local testing.
  2. On the Local Testing prompt, in the General section, click the Resolve all URLs through my network checkbox.
    For example, if there is a URL abc.com that is restricted to your network, or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment, enabling this option resolves all abc.com requests from a remote browser or mobile device through your machine.

Resolve all URLs through user network

Step 1: Download the BrowserStack Local binary for macOS/OS X.

Note: The download links are secure. The binaries are digitally signed, identifying the publisher as BrowserStack Ltd.

Step 2: Unzip the file to a folder/directory on your system, open the command-line interface, and navigate to the folder containing the Local binary.

Step 3: Run the Local binary using the following command:

./BrowserStackLocal --key YOUR_ACCESS_KEY
Important: If you have an M1 Macbook and get the error zsh: bad CPU type in executable: ./BrowserStackLocal while running the binary, please install Rosetta and then re-run the binary.

Local Testing is enabled for your Live sessions and screenshots. To verify, launch a Live session on your browser, and near the Local Testing option on the Live toolbar, look for the green/red indicator that indicates whether Local Testing for your session is enabled/disabled.

Enable local testing and screenshots for live sessions

To resolve all requests to local URLs through your system,establish the Local Testing connection with a --force-local flag, as follows:

./BrowserStackLocal --key YOUR_ACCESS_KEY --force-local

For example, if there is a URL abc.com that is restricted to your network, or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment, enabling this option resolves all abc.com requests from the remote browser/mobile device through your system.

Note: To set up Local Testing for other environments/network configurations, refer to our complete list of flags. For Local Testing setup in common network configurations, refer to Use Local Testing with Live.

Step 1: Download the appropriate BrowserStack Local binary for your system: Linux 32-bit | Linux 64-bit.

Note: The download links are secure. The binaries are digitally signed, identifying the publisher as BrowserStack Ltd.

Step 2: Unzip the file to a folder/directory on your machine, open the command-line interface, and navigate to the folder containing the Local binary.

Step 3: Run the Local binary using the following command:

./BrowserStackLocal --key YOUR_ACCESS_KEY
Important: If you have an M1 Macbook and get the error zsh: bad CPU type in executable: ./BrowserStackLocal while running the binary, please install Rosetta and then re-run the binary.

Local Testing is enabled for your Live sessions and screenshots. To verify, launch a Live session on your browser, and near the Local Testing option on the Live toolbar, look for the green/red indicator that indicates whether Local Testing for your session is enabled/disabled.

Enable local testing and screenshots for live sessions

To resolve all requests to local URLs through your system, establish the Local Testing connection with a --force-local flag, as follows:

./BrowserStackLocal --key YOUR_ACCESS_KEY --force-local

For example, if there is a URL abc.com that is restricted to your network, or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment, enabling this option resolves all abc.com requests from the remote browser/mobile device through your system.

Note: To set up Local Testing for other environments/network configurations, refer to our complete list of flags. For Local Testing setup in common network configurations, refer to Use Local Testing with Live.

Website Loading Errors

Important: Currently, localhost is not supported on iOS (iPhone & iPad) Chrome browsers. To test your localhost website on iOS Chrome, replace localhost with bs-local.com. For example, use bs-local.com:3000 instead of localhost:3000.

If you are not on iOS Chrome and see the local error page when trying to access a private website in a BrowserStack Live session, there is a possibility that you are behind network restrictions such as a proxy, firewall, or a VPN.

Local Error Page

  • If the Local testing indicator is red: Ensure that you have the Local Desktop Application installed and connected.
  • If the Local testing indicator is green and you still see the error page: There may be network restrictions on your website under test. Use the following procedures for testing websites behind proxy, firewall, or VPN, to try resolving the error.

If the test website is behind a proxy

If your test website is behind a proxy, add the configuration to the “Local Connection Dashboard”, as defined here.

If the test website is behind a firewall or VPN

If your test website is behind a firewall or VPN with IP restrictions, try enabling force local, as defined here.

Disconnect Local Testing

The Local Testing connection is persistent. Your system and BrowserStack Cloud remain connected unless:

  • You explicitly end the connection (for example, when using the binary).
  • You close the browser window.
  • You sign out of your BrowserStack account.

If you accidentally close the browser tab, you can resume Local Testing on re-opening the tab.

Next Steps

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy