Most programmers want diagnostic output statements in their programs, particularly during the early stages of development. The TRACE statement acts like printf except that it has no effect with the Release version of the library. In the Windows environment, debugging output goes to the CodeView debugger if it is present; otherwise it goes to device AUX.
You can use the afxDump dump context object for stream-style dumping of standard types as well as Microsoft Foundation class objects. If you use afxDump, be sure to bracket references with #ifdef _DEBUG and #endif statements.