I'm trying to debug a javascript-heavy webapp running on the Palm Pre browser. There are various useful debugging messages that the app will output to console.log(). This app was not built specifically for the Palm Pre but runs great on other Webkit-based browsers such as S开发者_运维技巧afari.
How can I view the output of console.log from the Web application running in the Pre emulator? It appears that it's possible to view output for an app built for Pre specifically, but not output from the web browser itself.
Use palm-log --system-log-level=info
to turn on info-level logging (used by console.log) and create a file called framework_config.json
in your application directory with the following contents:
{
"logLevel": 99
}
You can write your own implementation of console.log() which outputs to a new window or div. Something like YUI Logger or log4javascript.
精彩评论