The information in this article applies to:
SYMPTOMSWhen using the Visual Workbench debugger, a new line is inserted in the debugging output window every time debugging information is output through the CDumpContext insertion operator or OutputDebugString(). This interferes with formatting done for the debug output. CAUSEA new line is inserted by the debugger after every call to the Windows 3.1 application programming interface (API) function OutputDebugString(). In the Microsoft Foundation Classes (MFC), the insertion operator (<<) for CDumpContext eventually maps to a call to OutputDebugString(), so every invocation of << for a CDumpContext object also introduces a new line in the output window. RESOLUTION
The following are three suggested workarounds:
STATUSMicrosoft has confirmed this to be a bug in the products listed at the beginning of this article. This problem was corrected in Visual C++ 2.0. MORE INFORMATIONThe following code fragment demonstrates the problem that occurs when calling OutputDebugString directly. The output that would normally appear on the same line actually displays over three lines: Code
Output
The code fragment below demonstrates how each insertion of debugging
text into the afxDump context causes a new line to appear in the
output window:
A call to myPerson.Dump(afxDump) produces the following output in the
Visual Workbench's output window:
The following is what is desired:
Additional query words: newline afxDump 1.00 1.10
Keywords : kbDebug kbide |
Last Reviewed: September 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |