By default BrowserStack does not have functionality to work with your local machine code. To get this working you have to install BrowserStack local extension.Therefore follow below steps to get it working.

Step-by-step guide

  1. Make sure you have an account or BrowserStack access.
  2. Login to site.
  3. When you access, you will see install additional features extension.
  4. Click this link which will redirect to BrowserStack local extension. if you missed this, go to chrome extension, search and install the extension. A link to the extension is given at the end of this document, if needed.
  5. After installing you can create a new browser instance.
  6. On the screen you click on the gear icon in the Switch widget area.
  7. There you will find an option called Local server tick. (see Screenshot: Enabling local server testing)
  8. Tick that to enable local network access.
  9. Now you can type your local application URL(e.g. localhost) on the testing browser and it will load your local web.

Screenshot: Enabling local server testing