title: JavaScript: Is there a way to get Chrome to break on all errors?
body: <p>I am looking for an equivalent in Chrome to the "break on all errors" functionality of Firebug. In the Scripts tab, Chrome has a "pause on all exceptions", but this is not quite the same as breaking on all errors.</p>
  
  <p>For instance, when loading a page with the following code, I would like Chrome to break on the line <code>foo.bar = 42</code>. Instead, even when enabling the "Pause on all exceptions", I don't get the expected result.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
      &lt;head&gt;
          &lt;script type="text/javascript"&gt;
  
              function doError() {
                  foo.bar = 42;
              }
  
              window.onload = function() {
                  try {
                      doError();
                  } catch (e) {
                      console.log("Error", e);
                  }
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>You can try the code pasted above on <a href="http://dl.dropbox.com/u/6900/try/ee-chrome-errors.html" rel="noreferrer">this page</a> or using this <a href="http://jsfiddle.net/avernet/KvjNB/" rel="noreferrer">jsFiddle</a>.</p>