Meanwhile you are coding and you want to stop the execution of the code at any specific point, you just add to your code the following statement:


debugger;

The debugger statement invokes any available debugging functionality, such as setting a breakpoint. If no debugging functionality is available, this statement has no effect.

Source: MDN Web Docs