Setting up weinre remote debugging

拜拜、爱过 提交于 2019-12-03 07:33:57

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.

The weinre server is "started" by executing this command weinre --boundHost a.b.c.d where a.b.c.d stands for the local IP of the desktop used for debugging. The port 8080 will be opened (default port, but you may configure an other one).

At this point, the script http://a.b.c.d:8080/target/target-script-min.js becomes available on your local network, and may be called by your application located on an other device in the same local network.

If your application or tested web page call this script, it will be seen by your desktop.

Therefore, you don't have anything to upload on your target...

Weinri debug resume

After successfully installed weinri,

1 - Run this command with your ip address:

  weinre --boundHost 192.168.12.3

2 - Attach in your code header:

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

3 - Access your website in your tablet or whatever device

3 - Get the wenri debug screen on:

   http://localhost:8080/client/#anonymous

Obs: 'anonymous' word can be replaced by another of your choice.

if you can't debug your html page even after completing all of the steps mentioned in the Nokia Developer Article, then check your windows firewall settings.Please be sure that the firewall setting for private network is TURNED OFF ..

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!