afxTraceEnabled 

BOOL afxTraceEnabled;

Remarks

A global variable used to enable or disable output from the TRACE macro.

By default, output from the TRACE macro is disabled. Set afxTraceEnabled to a nonzero value if you want TRACE macros in your program to produce output. Set it to 0 if you don’t want TRACE macros in your program to produce output.

Usually, the value of afxTraceEnabled is set in your AFX.INI file. Alternately, you can set the value of afxTraceEnabled with the TRACER.EXE utility.For more information on afxTraceEnabled, see Technical Note 7.

Example

#ifdef _DEBUG
    if (afxTraceEnabled) {
        TRACE("Dumping computationally intensive information\n");

        // Dump lots of useful debugging information which
        // requires more processing than we'd normally like to
        // do in our debug build.
    }
#endif

See Also   afxTraceFlags, TRACE