Setting up weinre remote debugging

weinre

Solution

The way you start the weinre sever is by running the command

weinre

in your command line. And then you leaving it running for as long as you're still using weinre. You have options for this command that you can find by type `weinre --help`, but the important ones are `--boundHost`, and `--httpPort`. `--boundHost` defaults to localhost and `--httpPort` defaults to 8080. So run

weinre --boundHost 192.168.1.2

where 192.168.3.4 is your ip address, which you can find by running ipconfig. Put the following in your code:

<script src="http://192.168.1.2:8080/target/target-script-min.js#whatever"></script>

Then, in your browser, go to

http://192.168.1.2:8080/client/#whatever

I wrote a blog post about it here: https://adam.garrett-harris.com/how-to-setup-remote-debugging-in-phonegap

To answer your second question, the target-script-min.js is just a javascript file that's a part of weinre whenever you install it. When you have weinre running, you can visit

http://192.168.1.2:8080/target/target-script-min.js

to see the file if you want.

Problem

Instructions for running weinre state that I need to insert following script: ``` <script src="http://a.b.c:8081/target/target-script-min.js"></script> ``` where `http://a.b.c` is my server IP or host name. Couple of questions: Does this mean that I must open port 8081 on my remote server? Also what is the `target-script-min.js`? It looks like I need to upload it to a `target` folder?

Original source

Related problems