title: How to turn custom errors off when deploying to azure in debug mode only
body: <p>I am working on a site where we use Web.Debug.config with transform XSLT to turn custom errors off</p>
  
  <pre><code>&lt;customErrors mode="Off" xdt:Transform="Replace"/&gt;`
  </code></pre>
  
  <p>However this doesn't seem to be taken into consideration when deploying to azure.</p>
  
  <p>From </p>
  
  <p><a href="https://stackoverflow.com/questions/4734776/azure-web-config-per-environment">Azure web.config per environment</a></p>
  
  <p>I can see that azure uses .cscfg files, and that what I am trying to accomplish will probably involve these files? What is the simplest way to turn custom errors off when deploying to azure but only when in debug? </p>