console assert function cond text if cond return console log assert triggered stop all any itervals as well let intervalid window setInterval function 9999 Get a reference to the last for let i 1 i intervalid 100 i window clearInterval i if console assert useDebugger debugger throw new Error text Assertion failed test let aa window setInterval function 3000 console log aa let bb window setInterval function console log tickbb 3000 console log bb trigger assert console assert false console log stopped before it got here
useDebugger debugger throw new Error text Assertion failed test let aa window setInterval function 3000 console log aa let bb window setInterval function console log tickbb 3000 console log bb trigger assert console assert false console log stopped before it got here