Running your own weinre server

Version 6

    The Edge Inspect team provides a weinre server in the Adobe Creative Cloud that the Edge Inspect Chrome extension uses by default when you choose the remote inspection option. This may not be a viable option for some people for a number of reasons:

    1. You are developing and testing on a wireless network that doesn't have Internet access, so you can't use the Remote Inspection feature.
    2. The pages you're developing are under NDA or have other IP concerns and cannot be exposed outside of your internal network.
    3. For some unknown reason one or more of your devices just don't seem to be able to reliably connect to the default weinre server.
    4. You need better performance than you're able to get using the default weinre server.


    For any of those reasons you might want to run your own instance of weinre to use with Edge Inspect. Fair enough. So in this document I'm going to try to make it as simple as possible to do just that.


    Setting up and Running weinre

    On the host computer where you want to run weinre, perform the following steps:

    1. Download and install node.js
    2. Use npm to download and install weinre
      • Open a command prompt window
        • Mac OS: The Mac command prompt can be accessed through a utility called terminal. To access the terminal utility:
          • Command + Space will bring up your Spotlight search (Magnifying glass in the upper right of your screen)
          • Start typing "terminal".

          • Select the terminal application

        • Win: Click the Start button and type cmd into "Search programs and files" input box and press enter
      • Enter the following command:
        • Mac OS: sudo npm install -g weinre
          • Win: npm install -g weinre
          • (Note: the -g option here means "global" and installs weinre to a folder in your path so you can run weinre without needing to navigate to a folder or specify a path to weinre.)
      • Launch weinre
        • Open a command prompt window
        • Type the following command line
          • WINDOWS node weinre --boundHost -all- ("-all-" makes weinre available on localhost and all your IP addresses)
          • MAC weinre --boundHost -all-
        • You should see a message similar to this: "2012-10-12T20:33:06.957Z weinre: starting server at http://localhost:8080"
      • Ensure weinre is running
        • From the computer you want to use Edge Inspect with your new weinre instance, go to a browser and enter the URL and port number you saw in the previous step.
        • You should see a page with information about weinre. If you do, weinre is up and running on that computer.
      • Tell Edge Inspect to use your new shiny new weinre server
        • Right-click on the Edge Inspect Chrome extension icon and choose Options
        • Look for the Weinre Server section and change the dropdown from "Default (Adobe)" to "Custom".
        • Edit the text input field next to the dropdown and put in the your computer's IP address and port number. You may enter
          or you can find your computer's IP address displayed at the top of the Edge Inspect dialog in Chrome.
        • Click the Save button next to the URL field.


      You should now be able to use Edge Inspect and do remote inspection from your own weinre instance.



      Shutting down weinre

      You can stop the weinre server at any time either by closing the command prompt window where it's running or by giving that window focus and pressing Ctrl-C.



      How to handle host computer IP address changes

      If the IP address of the machine you're running weinre on ever changes, you can deal with that pretty easily.

      1. Shut down weinre as detailed above.
      2. Open a new command prompt window (or re-use the one it was running in)
      3. Type the following command line:
        • WINDOWS node weinre --boundHost -all-
        • MAC weinre --boundHost -all-
      4. Switch to Chrome, and right-click on the Edge Inspect icon, choose Options, and in the weinre Server section, update the IP address.



      If you have questions or problems with this process, feel free to post a question on the Edge Inspect forums: