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.
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.
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:
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.
To resolve all requests to local URLs through your system:
- On the Live toolbar, click Local testing.
- On the Local Testing prompt, in the General section, click the Resolve all URLs through my network checkbox.
For example, if there is a URLabc.com
that is restricted to your network, or you have/etc/hosts
entry forabc.com
mapping to localhost or an internal server/environment, enabling this option resolves allabc.com
requests from a remote browser or mobile device through your machine.
Step 1: Download the BrowserStack Local binary for Windows.
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
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.
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.
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:
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.
To resolve all requests to local URLs through your system:
- On the Live toolbar, click Local testing.
- On the Local Testing prompt, in the General section, click the Resolve all URLs through my network checkbox.
For example, if there is a URLabc.com
that is restricted to your network, or you have/etc/hosts
entry forabc.com
mapping to localhost or an internal server/environment, enabling this option resolves allabc.com
requests from a remote browser or mobile device through your machine.
Step 1: Download the BrowserStack Local binary for macOS/OS X.
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
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.
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.
Step 1: Download the appropriate BrowserStack Local binary for your system: Linux 32-bit | Linux 64-bit.
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
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.
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.
Website Loading Errors
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.
- 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
- Learn how to test websites using Local Testing
- Learn how to test websites in environments behind one (or more) proxies
- Learn how to test websites hosted on environments behind a firewall or VPN
- Learn more about what isn’t supported
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
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!