title: The DEBUG constant in Visual Studio 2012 won't activate
body: <p>Trying to use the ifdef DEBUG constant in Visual Studio doesn't work for me in a .NET Framework 4.5, ASP.NET MVC 4.</p>
  
  <p>I made sure:</p>
  
  <ul>
  <li>The "Define DEBUG constant" is checked for the Debug configuration in project properties</li>
  <li>The Web.config does include the <code>&lt;compilation debug="true"...</code></li>
  </ul>
  
  <p>The code I use to verify shows isDebug = false, both in the IDE and in runtime, even though i run under the Debug-configuration:</p>
  
  <pre><code>bool isDebug;
  #if DEBUG
      isDebug = true;
  #else
      isDebug = false;
  #endif
  </code></pre>
  
  <p>This is a screen cap of Visual Studio, showing i have the Debug-configuration active, but in the code, the color highlighting says that DEBUG is not defined.</p>
  
  <p><img src="https://i.stack.imgur.com/LQnwX.png" alt="if DEBUG isDebug=true else isDebug=false"></p>
  
  <p>I must be missing something!</p>
  
  <p>Edit: Screen cap of what the properties window shows for the Build-view:
  <img src="https://i.stack.imgur.com/dyGHN.png" alt="Properties-window"></p>