JavaScript
Debugger is very important in javascript because It is difficult to write JavaScript code without a Debugger
Your code might contain syntax errors, or logical errors, that are difficult to diagnose.
There are no indications for errors in javascript. It does not display any error messages.
With a debugger, it becomes easy to set breakpoints and examine variables while the code is executing.
To activate debugging in your browser, console.log() Method is used. It displays JavaScript values in the debugger window.
Example
<` !DOCTYPE html>
<html>
<body>
<h1>My First Web Page</h1>
<p>
Activate debugging in your browse by pressing F12, and select "Console" in the debugger menu.
</p>
<script>
a = 5;
b = 6;
c = a * b;
console.log(c);
</script>
</body>
</html>
0 Comment(s)