In the debugger window, you can set breakpoints in your JavaScript code.
When the code reaches a breakpoint, execution will pause, allowing you to inspect JavaScript values.
Once you’ve examined the values, you can resume the code execution, usually by clicking a play button.
The debugger keyword pauses the execution of JavaScript and invokes the debugging function (if available).
This behaves the same way as setting a breakpoint in the debugger.
If no debugger is present, the debugger statement has no effect.
When debugging is enabled, the code will halt before executing the third line.
let x = 15 * 5; debugger; document.getElementById(“demo”).innerHTML = x; |
Typically, you can activate debugging in your browser by pressing F12 and selecting “Console” from the debugger menu.
If that doesn’t work, follow these steps:
Debugging is the process of testing, identifying, and fixing bugs (errors) in computer programs. The first known computer bug was an actual insect that got stuck |