gpt4 book ai didi

android - 在 Android Studio 中显示 Cordova "console.log"条目

转载 作者:搜寻专家 更新时间:2023-10-30 22:41:53 24 4
gpt4 key购买 nike

我有一个使用 Vue.js 的 Cordova 应用程序,以及使用标准 Javascript/浏览器 console.log() 进行的大量日志记录。到目前为止,我只针对 iOS,那些 console.log 消息出现在 xCode 日志查看器中。

不过,现在我也瞄准了 Android。我已经成功地将 Cordova 项目导入到 Android Studio 中,并且该应用程序正在模拟器中以 Debug模式运行。但是,我无法在任何地方找到 console.log 输出。

我认为日志输出应该出现在这里,但我的应用程序什么也没有。

enter image description here

正如@Lukasz 所描述的,我也尝试过 Logcat,但也没有效果:

enter image description here

最佳答案

您应该按照此处所述尝试使用 chrome inspect:

https://developers.google.com/web/tools/chrome-devtools/remote-debugging/

如果您真的想从 Android Studio 中查看 console.log 语句,您可以使用 logcat View -> Tool Windows -> Logcat。请记住像我在下图中所做的那样通过“CONSOLE”语句对其进行过滤。

enter image description here

关于android - 在 Android Studio 中显示 Cordova "console.log"条目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52782751/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com