Appcelerator Titanium - 如何在 logcat 中查看警报?

Appcelerator Titanium - how to view alert in logcat?

如果我的应用程序中有警报

alert("howdy");

我需要做什么才能使用 adb logcat 命令查看该警报?我已尝试 adb logcat *:v 但没有任何显示 - 尽管我可以在 运行 应用程序中看到警报!

alert() 在 Android 中显示一个对话框,不执行任何操作 console/adb。

但是,如果您想让事情显示出来,您应该使用日志记录工具

如果您深入研究 documentation,您需要使用 debuginfoerror 方法来插入不同级别的日志记录。

console.log()console.warn()console.error() 也可以。