In a php file i have used include
to include the following js.php file
and prior to that i have included the jquery file.
Following Zakas' The art of throwing JavaScript errors, I began to throw my own errors in JavaScript as an approach to finding JS issues.
But this approach unfortunately started causing the jQuery ready() functions to silently fail, for unrelated parts of the site. :(
I learned that the following are different:
throw new Error()
is different from
console.error()
So, I started to use console.error(), and I still got the red highlighting in the console.