I want to inspect elements of my page in development that disappear right after he mouse leaves them. Fot this and other scenarios I want something like a "disable JS" plugin or console-command, that works not only at pageload time, but can completely halt any and every js of the current page at any time.
Does such a solution exist? I would prefer chrome, but accept firefox. Thanks.
setTimeout = function(code, delay) { return _setTimeout(function () { if (_pauseOn == true) { return; } code(); }, delay); }; window. clearTimeout = function(intervalId) { if (_pauseOn == true) { return; } _clearTimeout(intervalId); }; window.
You don't necessarily need to have an HTML page. Open Chrome, press Ctrl+Shift+j and it opens the JavaScript console where you can write and test your code.
What worked for me to pause execution:
You can also put in "breakpoints" within the same console. Try the following to use breakpoints:
Try using the debugger;
directive (relevant MDN article). This acts like a breakpoint and should help you debug your scripts using the normal developer console.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With