Debugging using Javascript

Debugging using Javascript To check the value of variables and return types and many other data,
We need to the inspect eleemnt plug-in of the browser.

In the Inspect Element window, click on the "Console" tab

In most browsers, console is listed as a collection of prompts.

All Warnings and error messages are displayed with line numbewr and stack trace
These are listed in red colour.

Sometimes we may want to check if a variable has a particular value at a particular point in a program or to check if a varible is declared after it is used or if there is an infuinte recursion or an infinite while loop or for loop.

For this use the following code:

console.log("value of a in function test() is: " + a)

Comments

Popular posts from this blog

Parallel Database design, query processing

Apache Hadoop Prerequisites and Installation

Starting with Apache Hadoop