如何在PhoneGap应用程序中使用Eclipse和HTC Desire HD显示console.log()输出? [英] How to display console.log() output in PhoneGap app using Eclipse and HTC Desire HD?
问题描述
请参阅PhoneGap邮件列表线程。另外,两个stackoverflow线程此处和其中。
似乎在运行Android 2.2的HTC设备上禁用console.log。
我发现最好的解决方法是使用 weinre ,它拦截console.log以显示其桌面浏览器控制台中的输出。
更新: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屋!