Chrome's developer tools are an excellent set of tools that I love to use. Unfortunately, I've come across a very strange issue as of late when I refresh the page whilst keeping the developer tools window open: Chrome pauses the javascript execution and points to the line specified below.
try {
// This should fail with an exception
// Gecko does not error, returns false instead
matches.call(document.documentElement, "[test!='']:sizzle"); // this is where it breaks
} catch (pseudoError) {
pseudoWorks = true;
}
An exception causes the script to pause, despite that the exception itself is positioned within a try-catch block. Is there any way I can alter this behaviour? Or is there something that I've missed?
I've just solved this problem (in my case, might be different). I have accidentally clicked on "Pause on Exceptions" button in chrome's console. This one: https://developers.google.com/chrome-developer-tools/docs/scripts-breakpoints#js_exceptions
Here's the location of that small, easy-to-miss Pause on Exceptions button, and its three toggle states:
Possibly it's a known bug , check this: http://bugs.jquery.com/ticket/7535 . I have found this solution there, I hope it helps:
try {
// This should fail with an exception
// Gecko does not error, returns false instead
// <orig. $jquery-1.5:>
// matches.call( document.documentElement, "[test!='']:sizzle" );
// <proposal to Ticket #7535, 2011-03-24:>
if( ! html.mozMatchesSelector || document.currentScript ){
matches.call( html, "[test!='']:sizzle" );
}
//else{
// /*FF lt 4*/
//}
} catch( pseudoError ) {
pseudoWorks = true;
}
// <testing only>
// alert('MalformedSelectorException thrown: ' + pseudoWorks );
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