Tag: weinre

Weinre在heroku上

我正在尝试在Heroku上设置Weinre ,但是我遇到了一些问题。 我设法构build应用程序,只需使用一个package.json与weinre npm依赖和一个Procfile,看起来像下面 web: node_modules/weinre/weinre –httpPort $PORT 起初一切似乎工作,客户端显示的用户界面,JS文件加载正常,但debugging不起作用,并没有客户端在服务器端出现。 在查看日志的同时,我意识到每次包含/ ws / target / *或/ ws / client / *的请求都会收到404错误 2012-05-31T22:37:53+00:00 heroku[router]: GET xxxx.herokuapp.com/target/target-script.js dyno=web.1 queue=0 wait=0ms service=10ms status=200 bytes=190900 2012-05-31T22:37:36+00:00 heroku[router]: GET xxxx.herokuapp.com/ws/target/t-3 dyno=web.1 queue=0 wait=0ms service=3ms status=404 bytes=9 2012-05-31T22:36:39+00:00 heroku[router]: POST xxxx.herokuapp.com/ws/client/c-1 dyno=web.1 queue=0 wait=0ms service=40ms status=404 bytes=9 这个设置工作本地没有问题。 我也尝试了与–boundHost 0.0.0.0并得到了同样的错误。 当我使用我的heroku应用程序域/子域作为主机我得到weinre: error […]

电话weinre没有发现任何目标

我尝试启用weinre进行debugging,但是问题在于weinre找不到目标。 这是我做的: 通过nodejs命令安装weinre:npm install weinre -g 通过USB线连接我的android设备(Huawaei智能手机),并在android手机上启用debugging模式。 开始weinre,命令:weinre –boundHost 192.168.2.1 index.html如下所示: <!doctype html> <html> <head> <title>tittle</title> <!– Weinre testing for remote debug with physical device –> <script src="http://192.168.2.1:8080/target/target-script-min.js#anonymous"></script> <script>window.location='./main.html';</script> <body> </body> </html> 在我添加的config.xml <access origin="http://192.168.2.1:8080/*" /> 最后在main.html(这是真正的起始页面)我补充说: <script type="text/javascript" charset="utf-8" src="cordova.js"></script> 然后我压缩应用程序所需的所有文件,并将其上传到phonegap构build。 在phonegapbuild立所有应用程序后,我用移动设备扫描bardcode。 现在设备开始下载应用程序。 我在设备上启动应用程序。 并访问该网站 http://192.168.2.1:8080/client/#anonymous =>应用程序开始,但是网站weinre-server显示“Target:NONE” 我错过了什么? 我在Firefox和Chrome上尝试了这个过程。 我很确定移动设备不使用与我的台式机相同的“本地主机”。 weinre服务器属性是:

Weinre JS API onload / ready事件

我正在使用Weinre来debugging一个iPad应用程序,并且正在寻找一个Weinre的JScallback函数,当Weinre完成加载时发出信号,例如在我的代码中使用它的console对象是安全的。 我查看了文件和target-script.js ,将Weinre挂钩到我的页面,但找不到任何东西。 任何帮助,将不胜感激。