有没有真正的解决方案来调试cordova应用程序 [英] Is there a real solution to debug cordova apps

查看:138
本文介绍了有没有真正的解决方案来调试cordova应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去两天,我花了两年时间来研究如何调试使用Cordova 3.2创建的HTML5应用,并将其部署到Android 2.3设备。我看到的所有文章/帖子都提供了黑客而不是真正的解决方案:(大部分时间,它们都不适用于我的情况;调试我的应用程序中的css样式和Angularjs代码。



到目前为止,我测试了



debug.phonegap.com



我将脚本注入到 index.html 文件中,然后访问debug.phonegap.com中生成的URL,但没有任何反应;只有一个空白页。 / p>

Weinre



我发现的大部分文章指向过时的Github仓库,一个Jar文件..但没有找到:(



边缘检查



它的工作原理和显示我正在手机中的PC上浏览的网页。但问题是它使用一些其他集成浏览器(或仿真器),而不是运行phonegap应用程序;所以结果是不准确的。 p>

Chrome模拟器



与Edge相同光谱它不允许查看Android 2.3附带的真实的Web-kit v530。



梦想解决方案



完美的解决方案将是Google Chrome(桌面)的扩展,可让您将桌面浏览器切换到Android 2.3平台中的浏览器;没有仿真没有黑客,只是浏览器本身与web-kit v 530。



不幸的是,这样的解决方案不存在:(或我错了?



任何建议?

解决方案

注意



这个答案是旧的(2014年1月),自那时以来,有很多新的调试解决方案可用。






我终于得到了它的工作!使用weinre和cordova(没有Phonegap构建),并为未来的开发人员节省麻烦,谁可能面临同样的问题,我做了一个 YouTube教程;)


I spent the last two days trying to figure out how to debug an HTML5 app I created using Cordova 3.2 and deployed to an Android 2.3 device. All the articles/posts I've seen provide hacks rather than real solutions :( and most of the time, none of them works for my case; debug the css styles and the Angularjs code inside my app..

So far I tested;

debug.phonegap.com

I injected the script to the index.html file then visited the generated URL in debug.phonegap.com but nothing happens; only a blank page.

Weinre

Most of the articles I found point to obsolete Github repository that countain a Jar file.. but it's not found :(

Edge inspect

It works and shows the webpage I'm browsing on the PC inside the mobile.. But the problem is that it uses some other integrated browser (or emulator) than the one that runs phonegap apps; so the results are not accurate.

Chrome emulator

Same as Edge inspect; it doesn't allow to view real web-kit v530 that is shipped with Android 2.3.

The dream solution

The perfect solution would be an extension to Google Chrome (desktop) that enables you to switch the desktop browser to the same one found in Android 2.3 platforms; no emulation no hacks, just the browser itself with web-kit v 530.

Unfortunately such solution doesn't exist :( or I'm wrong?

Any suggestions?

解决方案

NOTICE

This answer is old (January 2014) many new debugging solutions are available since then.


I finally got it working! using weinre and cordova (no Phonegap build) and to save hassle for future devs, who may face the same problem, I made a YouTube tutorial ;)

这篇关于有没有真正的解决方案来调试cordova应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆