Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Break into chrome debugger when console.assert fails

How can I cause a break when console.assert() fails (other than replacing assert function with my own and setting breakpoint there) ?

like image 267
Marcin Wisnicki Avatar asked Aug 04 '26 03:08

Marcin Wisnicki


1 Answers

When you first fire up the Chrome Developer Tool

Click on the pause icon that says on mouseover "Do not pause on exceptions. Click to pause on all exceptions" at the very bottom bar of the Chrome Developer Tool near the left side. If you can not find that icon, press the Sources tab within the Chrome Developer Tool.

That icon should turn blue. If it doesn't turn blue the first time, click on it a second time. Then, it will pause even on console.assert(false);

like image 144
Stephan Branczyk Avatar answered Aug 06 '26 16:08

Stephan Branczyk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!