Weinre Emulator not connected

308 views
Skip to first unread message

Laurentiu Pop

unread,
Sep 10, 2013, 9:25:21 AM9/10/13
to wei...@googlegroups.com
Hello, 

I am trying to use weinre to debug the interface of my app but unfortunately if I open the emulator from eclipse it doesn't appear in weinre. BoundHost is set to -all- and httpPort is 8080. The funny thing is that if I run it from the browser then it shows it in the weinre list. Is there a difference between emulator ip and the one that weinre is listening to or what can it be ? Read all the posts from here and everywhere, tried everything and it didn't work. I would like to use weinre for javascript debugging .

Also tried to change the DDMS from eclipse to localhost or 127.0.0.1 and post 8080 but that didn't do anything

Thank you and have a nice day

Patrick Mueller

unread,
Sep 10, 2013, 9:42:04 AM9/10/13
to wei...@googlegroups.com
> I would like to use weinre for javascript debugging

First off, weinre doesn't have JavaScript debugging that people usually want, like break points, stepping through lines of JavaScript, etc.  You can execute JS from the console, but that's about it.

I assume this is Android?  

The weinre code in the target (your emulator) needs to be able to connect to the weinre server.  I don't remember the ins-and-outs of Android networking for the emulator, but I think you will need to point the target to your ip address of the machine running the weinre server.  And of course, you need to be able to route to that address from your emulator.  You can't use localhost, I assume, because the Android emulator is running in a vm with it's own localhost.

Stewart Martin

unread,
Sep 24, 2013, 9:29:21 AM9/24/13
to wei...@googlegroups.com
I got this work with a wp8 emulator, but I haven't tried it with an android emulator yet.  I had to use a local install of weinre and then used the ip address of the computer weinre is running on like this <script src="http://192.168.0.100:8080/target/target-script-min.js#anonymous"></script>.  I can then use localhost on the same computer that is running weinre.  I also forwarded port 8080 on the router and can access it by the dhcp address within the network.  I have a ddns set up and can access it from outside the network, also.

If that doesn't work you may be able to use adb like adb forward tcp:8888 tcp:8888 to be able to access with localhost.

On Tuesday, September 10, 2013 8:25:21 AM UTC-5, Laurentiu Pop wrote:
Enter code here...
Reply all
Reply to author
Forward
0 new messages