English 中文(简体)
How to view console.log output when running javascript app in Palm Pre browser
原标题:

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 Safari.

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.





相关问题
How to access images loaded from css in Qt Webkit (java)

In Qt WebKit you can call QWebFrame.renderTreeDump() to see the render tree. For images in html <img src=...> you get something like: RenderImage {IMG} at (0,0) size 174x71 However, there ...

How i can track Safari activity from my application

I have to develop an application to monitor Safari activity like all open url , tabs on particular window and loding time of particular url. I also need to track online streaming that is happening on ...

Cocoa WebView cross-thread access

I have a C++ class running in its own thread that needs to execute some javascript in a WebView that s part of a Cocoa app. I have the C++ app call a method in the Cocoa window s controller and it in ...

Best browser for testing under Safari Mobile on Linux?

I have an iPhone web app I m producing on a Linux machine. What s the best browser I can use to most closely mimic the feature-limited version of Safari present on the iPhone? (It s a "slimmed down" ...

Table cells bad rendering with Google Chrome/Webkit

On the following code, COL1A and COL3A are not 50% height with Chrome or Webkit. It works fine with IE7 and Firefox. <table border="1"> <tr> <td height="100%">COL 1A</td>...

How to get a flash url in a webpage using a webframe?

As we know , When we load frame from webpage of safari, we will invoke the delegate methods of webkit informal protocol(WebFrameLoadDelegate): webView:didStartProvisionalLoadForFrame: webView:...

热门标签