Javascript quick tip debugger statement

Javascript quick tip debugger

Here is Javascript quick tip debugger for Javascript developers, there is a debugger statement in JavaScript, which invokes any available debugging functionality. e.g setting a break point, and if there is no debugging functionality available the statement has no effect.

Let’s say you wish to debug a function

One could then add a debugger; statement into the code to debug the function.

This will automatically launch the debugger in Chrome, Firefox, Opera, Safari and IE.

The debugger statement is part of EMCA script version 5.
For more information
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger

Taswar Bhatti Avatar

Written by