title: Any way to stop Javascript from failing silently?
body: <p>One thing that is driving me nuts is how Javascript fails silently in many different situations.</p>
  
  <p>(removed example because it confuses the point of my question)</p>
  
  <p>Many times I have come across an error that will give an error message when typed into the Firebug console, but when it runs within the page script, it fails silently, <strong>even with the Firebug console active and open!</strong></p>
  
  <p>Some of these problems can be caught by Crockford's JsLint, but still many won't.</p>
  
  <p>Isn't there a way to enable more error messages in the browser?</p>
  
  <p>Can you do this at all without using javascript debugger environments? I find debuggers don't help me much. I usually sprinkle a few console.log() statements and can locate the problem in a minute. What drive me nuts is that silent errors in Javascript can go unnoticed for a long time, or show up in ways that are not obvious at all. It's even more frustrating because testing the statement in the console DOES give an error, so what's going on?</p>
  
  <p>I have had the same problem with exceptions by the way, did anyone notice this? Often times my <code>throw new</code> statements don't work at all. But if I type the same thing in the console, it does.</p>
  
  <p><strong>Thanks for your helpful comments</strong> (first answers), but that is not my question. These tests are useful when you need to sanitize parameters to a class for example, when you don't know for sure about the environment. You don't want to test for existence of properties or classes where you <em>expect</em> them to be there; that would be bloating the code for no reason.</p>