Reputation: 504
Since Firebug was discontinued I had to started using the Dev Tools.
I was debugging a page, when I was clicking a button it was not firing the event. I realized a function was not defined, the JS file reference was missing, however, the Dev Tools did not tell me about it.
Trying my old still installed Firebug it threw something like "ReferenceError: foo function is not defined".
Do I need to enable any options more for Dev Tools? or isn't Dev Tools able to catch all the errors?
UPDATE
Test case
<script type="text/javascript">
function DoSomething(e){
e.preventDefault();
foo();
}
</script>
<a href="www.google.com" onclick="DoSomething(event)">Click me!</a>
Upvotes: 1
Views: 148
Reputation: 20085
You need to ensure that the "JS" filter is enabled within the Console panel.
If that doesn't help to see the error, you may try the new console frontend. In Firefox prior to version 55 this can be enabled by going to about:config
and setting the preference devtools.webconsole.new-frontend-enabled
to true
. In that new UI ensure that the filters "Errors" and "Warnings" are enabled.
If you still can't see the error logged, it's probably a bug in the DevTools. In that case you should try whether you can reproduce the problem in a new Firefox profile. If you can also reproduce it in the new profile, you should report the bug (if there isn't one already; bug 755553 seems to be related) and either profile a URL to a page where the error occurs or attach a reduced test case.
Upvotes: 1