title: Visual Studio disable TRACE in debug mode
body: <p>For a C++ project that I'm developing in Visual Studio 2005, I would like to disable the TRACE output option while running the code in debug mode. I have searched the internet about how to achieve this, but no luck. Is this even easily achievable? If so, how? Thanks in advance.</p>
  
  <p>Update #1:</p>
  
  <pre><code>#define     USETRACE        0
  #if !USETRACE &amp;&amp; DEBUG
      #undef TRACE
      #define TRACE(x)
  #endif
  </code></pre>
  
  <p>I tried the above code in debug mode, near the very top of stdafx.h, but TRACE is still outputting to the debug output. It would be great if suggestions on what's wrong with my implementation are provided so that I can fix it. Thanks.</p>