当前位置 : 主页 > 手机开发 > cordova >

PhoneGap / Cordova:控制台输出在哪里?

来源:互联网 收集:自由互联 发布时间:2021-06-10
我试图通过他们的开发者应用程序尝试PhoneGap应用程序时,在我的浏览器上获取控制台输出.但是,当尝试在Firefox上读取输出时,会出现: The Web Console logging API (console.log, console.info, console.
我试图通过他们的开发者应用程序尝试PhoneGap应用程序时,在我的浏览器上获取控制台输出.但是,当尝试在Firefox上读取输出时,会出现:

The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.

环顾四周,似乎Cordova是默认的控制台行为,可能与其console plugin一起使用(但是,如果没有它,它也无法工作).

我的问题是:如果不在浏览器窗口中,我究竟能在哪里找到此输出?我已经看到了一些提到Xcode控制台视图的答案,但我没有使用iOS.现在怎么办?

有各种各样的选项详细说明 here.您最有可能的选择是Chrome的远程调试器:

Chrome Remote Debugging

If you are doing Android PhoneGap debugging and have an Android 4.4 device and Chrome 30+, you can use the 07001 added in Android 4.4. If you are using Cordova 3.3 or higher, this is already supported, and only requires the Debuggable flag in your AndroidManifest.xml. For Cordova 3.2, you will need to enable WebView debugging using some code, or by use of a plugin.

网友评论