0 votes
in JavaScript by
What is a debugger statement ?

1 Answer

0 votes
by

The debugger statement invokes any available debugging functionality, such as setting a breakpoint. If no debugging functionality is available, this statement has no effect. For example, in the below function a debugger statement has been inserted. So execution is paused at the debugger statement just like a breakpoint in the script source.

function getProfile() {
  // code goes here
  debugger;
  // code goes here
}
...