开发者

How to view console.log output when running javascript app in Palm Pre browser

开发者 https://www.devze.com 2022-12-15 16:42 出处:网络
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 specificall

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号