Breakpoint Example

Use debugger to inspect code execution step by step.

Preview

Code

<script>
function calculate(a,b){
  debugger;
  return a + b;
}

calculate(10,20);
</script>

More JS Debugging Examples (7)