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

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

问题描述

过去两天,我试图弄清楚如何调试我使用 Cordova 3.2 创建并部署到 Android 2.3 设备的 HTML5 应用程序.我看过的所有文章/帖子都提供了一些技巧,而不是真正的解决方案 :( 大多数情况下,它们都不适用于我的情况;在我的应用程序中调试 css 样式和 Angularjs 代码..

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..

到目前为止我测试过;

debug.phonegap.com

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

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

我发现的大多数文章都指向过时的 Github 存储库,这些存储库包含一个 Jar 文件..但没有找到:(

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

边缘检查

它可以工作并显示我在移动设备内的 PC 上浏览的网页.但问题是它使用了一些其他集成浏览器(或模拟器)而不是运行 phonegap 应用程序的浏览器;所以结果不准确.

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 模拟器

与边缘检查相同;它不允许查看 Android 2.3 附带的真实 web-kit v530.

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

梦想的解决方案

完美的解决方案是对 Google Chrome(桌面)进行扩展,使您能够将桌面浏览器切换到与 Android 2.3 平台相同的浏览器;没有模拟没有黑客,只有浏览器本身和 web-kit v 530.

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?

有什么建议吗?

推荐答案

注意

这个答案是旧的(2014 年 1 月)从那时起,许多新的调试解决方案可用.

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

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

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天全站免登陆