VarWatch

The VarWatch object is a usefull debugging tool. It is designed to watch the values of your javascript variables during code execution. You can either programmatically add variables to the watch list, or you can add them during runtime through the user interface. The VarWatch object will display a list of all variables that you are watching, and their corresponding values will be updated every 500 millisecond.



An instance of the VarWatch object can be created, and variables assigned to it as easily as this:
<script>
	//create varWatch
	var varWatch = new VarWatch();
	
	//assign values
	varWatch.addWatch("Math.random()");
	varWatch.addWatch("Math.PI");
	varWatch.addWatch("myVariable");
</script>
Try Me!
Untitled Document