如何在PhoneGap应用程序中使用Eclipse和HTC Desire HD显示console.log()输出? [英] How to display console.log() output in PhoneGap app using Eclipse and HTC Desire HD?

查看:116
本文介绍了如何在PhoneGap应用程序中使用Eclipse和HTC Desire HD显示console.log()输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发PhoneGap webapp,在那里我使用一些javascript,有时我需要看到console.log()输出。我可以很容易地看到它在Chrome运行时,它也可以正常工作,当运行这个应用程序在Android模拟器 - console.log()的输出显示在Eclipse LogCat窗口。但是当我在我的HTC Desire HD上运行这个应用程序时,LogCat只显示一些Android特定的输出,但没有从我的webapp。



任何人都想知道如何显示在HTC Desire HD上运行的PhoneGap-app的console.log()输出。

解决方案

请参阅PhoneGap邮件列表主题。此外,两个stackoverflow线程此处在这里



似乎console.log在运行Android 2.2的HTC设备上禁用。



我发现的最佳解决方法是使用 weinre

:PhoneGap 1.3.0现在支持console.log直接从HTC Evo到LogCat,没有任何解决方法。 (同一个程序不能与PhoneGap 1.1.0一起使用)


I am developing PhoneGap webapp where I use some javascript, and sometimes I need to see console.log() output. I can easily see it when running in Chrome, it also works fine, when running this app in Android emulator - output of console.log() shows up in Eclipse LogCat window. But when I run this app on my HTC Desire HD, LogCat just shows some Android-specific output, but nothing coming from my webapp.

Anybody has idea how to display console.log() output from PhoneGap-app running on HTC Desire HD ?

解决方案

See the PhoneGap mail list thread. Also, two stackoverflow threads here and here.

It seems that console.log is disabled on HTC devices running Android 2.2.

The best workaround I've found is to use weinre, which intercepts the console.log to show the output in its desktop browser console.

Update: PhoneGap 1.3.0 now supports console.log directly to LogCat from the HTC Evo without any workarounds. (The same program doesn't work with PhoneGap 1.1.0)

这篇关于如何在PhoneGap应用程序中使用Eclipse和HTC Desire HD显示console.log()输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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