afxDump 

CDumpContext afxDump;

Remarks

Use this variable to provide basic object-dumping capability in your application. afxDump is a predefined CDumpContext object that allows you to send CDumpContext information to the debugger output window or to a debug terminal. Typically, you supply afxDump as a parameter to CObject::Dump.

Under Windows NT and Windows 95 (and earlier versions of Windows), afxDump output is sent to the Output-Debug window of Visual C++ when you debug your application.

This variable is defined only in the Debug version of MFC. For more information on afxDump, see MFC Debugging Support in Visual C++ Programmer’s Guide. Technical Note 7 and Technical Note 12 contain additional information.

Note   This function works only in the Debug version of MFC.

Example

// example for afxDump
CPerson myPerson = new CPerson;
// set some fields of the CPerson object...
//..
// now dump the contents
#ifdef _DEBUG
afxDump << "Dumping myPerson:\n";
myPerson->Dump( afxDump );
afxDump << "\n";
#endif

See Also   CObject::Dump, AfxDump