title: Python (visual studio) break on error
body: <p>I have Visual Studio 2015 with Python Tools, and I'm trying to debug a python application, but it doesn't break on a certain error.</p>
  
  <p>The error is an IndexError, which can be reproduced with this code: </p>
  
  <pre><code>matrix = [5, 6, 7]
  print matrix[2]
  print matrix[5000]
  </code></pre>
  
  <p>Running this will gives me a message in the console, but it won't automatically break.
  <a href="https://i.stack.imgur.com/STJ7g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/STJ7g.png" alt="Console message"></a></p>
  
  <p>On the other hand, if I have a NameError: </p>
  
  <pre><code>nonExistingFunction()
  </code></pre>
  
  <p>It does break, allowing me to easily see where it wrong...
  <a href="https://i.stack.imgur.com/pOluK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pOluK.png" alt="It can break the code apparently"></a></p>
  
  <p><strong>Is this normal? And is there a way to make visual studio break when there's an error like that IndexError?</strong></p>
  
  <p>Here is a screenshot of the options window (no idea if this actually applies to python) and the python tools > debugging</p>
  
  <p><a href="https://i.stack.imgur.com/RXh7D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RXh7D.png" alt="My settings for debugging, if that helps"></a>
  <a href="https://i.stack.imgur.com/UsSX4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UsSX4.png" alt="My settings for python tools &gt; debugging"></a></p>