title: How to catch errors and debug Excel DLL Add-Ins created under Visual Studio 2010 in C++?
body: <p>I use Visual Studio 2010 to make DLL add-ins for Excel 2010 that I include via VBA.
  I heard that errors in the add-in can crash Excel, for example accessing an array out-of-range.</p>
  
  <ol>
  <li>What's the best way to catch execptions/errors inside your C++ code?</li>
  <li>How can you debug your DLL functions called from Excel worksheets or VBA?</li>
  </ol>