Browse - Programming Tips - javaScript: stop execution

Date: 2019oct18
Language: javaScript
Keywords: breakpoint, pause

Q.  javaScript: stop execution
For example you don't want it to go to the next web page to debug.

A.  You can throw an error and the browser will stop

throw new Error('stop for debug');
In SpiderMonkey you can do:
sleep(9999); // Sleep for many seconds