Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weinre not working, trying to debug?

I think I may be missing something, but I have installed the .apk on my android tablet with the script

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

in the header.

I decided to try running it locally following http://forums.adobe.com/docs/DOC-2623. I went to "localhost:8080" and weinre is installed, but I still get the same thing "target not found".

I think I am missing a step, or I am not completely understanding how it connects to my app?

I have also tried building it via build.phonegap.com enabling debug mode, then installing the apk then clicking debug, gosh the steps are nice and easy but I can't get it to work.

I have to be missing something, so I hope someone can help me understand what I am missing.

Solved: Thanks to @Christian Kuetbach following his answer helped, let me add a few things just in case someone else has this issue.

  1. I made sure the script weinre gives you to add is loaded last, I put it at the very bottom, because I figured it should load after everything. Just did this to make sure.

  2. Make sure to connect to weinre properly, @Christian Kuetbach says it --boundHost -all- but I had to enter it like this weinre --boundHost -all- maybe adding the weinre is an obvious thing, but it could cause confusion, so make sure to do that I am running on win8 if that makes a difference.

like image 565
Michael Joseph Aubry Avatar asked Dec 07 '13 18:12

Michael Joseph Aubry


1 Answers

How did you start the weinre server part at the android device?

I think you'll nee to use the IP of you server (You Dev-Computer) in the HTML.

In case of Windows 8: https://kb.wisc.edu/page.php?id=27309

In that example above the IP is 144.92.124.118

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

update This will only work, if the device is online and in the same network as your PC and the firewall is configured to allow connections and weinre server is started with the parameter --boundHost -all-

like image 115
Christian Kuetbach Avatar answered Nov 13 '22 02:11

Christian Kuetbach