Debugging Javascript in the LiveView Desktop Web Browser

Debugging Javascript in the LiveView Desktop Web Browser

book

Article ID: KB0075984

calendar_today

Updated On:

Products Versions
TIBCO Live Datamart 7

Description

Debugging Javascript in the LiveView Desktop Web Browser

Issue/Introduction

Debugging Javascript in the LiveView Desktop Web Browser

Resolution

When working with the embedded web browser in LiveView Desktop (LVD), it may be necessary to debug the embedded pages. Typically, the web pages could be opened in an external web browser such as Chrome, Firefox, or even Internet Explorer where proper Javascript debugging tools could be utilized.

There are some differences in the rendering of web pages inside LiveView Desktop, such that debugging in an external browser such as Firefox, Chrome, or IE doesn't always resolve the bugs observed inside LVD. Even when you use proper DOCTYPEs and set the meta tag for X-UA-Compatible, some bugs still remain in your web apps and then embedded SWT web browser inside LVD does not provide much debugging assistance.

You may already be familiar with the developer tool called Firebug which may be used with Firefox. Aside from the Firebug plugin for Firefox, Firebug also provides a Javascript based utility that can be loaded into any web page which will provide you with the same debugging capabilities that the Firebug plugin provides in Firefox. This is what you can use to debug web pages running inside LVD.

First, you will need to copy the following line into your HTML page somewhere between the  <head> and </head> tags.
 
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>



Next, add debug="true" into your HTML tag like this:


 
<html debug="true">



Next, open LVD and launch the page you want to debug. When the page loads, you should see a panel at the bottom that includes an icon of a bug followed by buttons for Inspect and Clear. Below that, you will see tabs for Console, HTML, CSS, Script, and DOM. These are the tabs that will allow you to debug your web page inside LiveView Desktop.

Here is a screenshot of the Firebug Lite utility being used in LVD. This technique may be used for debugging any web page, even those that aren't displayed in LiveView Desktop.