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

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

问题描述

我花了最后两天试图找出如何调试我使用Cordova 3.2创建并部署到Android 2.3设备的HTML5应用程序。所有的文章/帖子我见过提供黑客,而不是真正的解决方案:(和大多数时候,它们都不适用于我的情况;调试css样式和Angularjs代码在我的应用程序..



到目前为止,我测试了;



debug.phonegap.com



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

Weinre



我发现的大多数文章指向过时的Github存储库a



它的工作原理,并显示我正在浏览的PC上的移动电话的网页..但问题是,它使用一些其他集成的浏览器(或模拟器),比运行phonegap应用程序,所以结果不准确。 p>

Chrome模拟器



它不允许查看Android 2.3附带的真正的web套件v530。



梦想解决方案



完美的解决方案将是对Google Chrome(桌面)的扩展,使您能够将桌面浏览器切换到Android 2.3平台上的浏览器;



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



有任何建议吗?

解决方案

注意 >

这个答案是旧的(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天全站免登陆