Microsoft KB Archive/899146

= In Visual C++ .NET or in Visual C++ 2005, the debugger may display incorrect line number information when you debug a source file that contains lines of code that have Macintosh OS line breaks =

Article ID: 899146

Article Last Modified on 1/16/2006

-

APPLIES TO


 * Microsoft Visual C++ 2005 Express Edition
 * Microsoft Visual C++ .NET 2003 Standard Edition
 * Microsoft Visual C++ .NET 2002 Standard Edition
 * Microsoft Visual C++ 6.0 Service Pack 5

-





SYMPTOMS
In Microsoft Visual C++ .NET or in Microsoft Visual C++ 2005, when you try to debug a source file that contains lines of code that end with Macintosh operating system (OS) line breaks, the debugger may display incorrect line number information.



CAUSE
This behavior may occur if the source file that you are trying to debug contains one or more lines of code that end with Macintosh OS line breaks. If the debugger does not read Macintosh OS line breaks correctly, the debugger will interpret every line of code that contains a Macintosh OS line break as if that line of code were the first line of code. Therefore, every line of code that contains a Macintosh OS line break will be displayed as &quot;line #1&quot;. If every line of code in the source file contains a Macintosh OS line break, the debugger will display every line of code in the source file as &quot;line #1&quot;.

Note Operating systems from different manufacturers use different types of line breaks. The following list describes some operating systems and the different types of line breaks they use:
 * The Macintosh operating system uses a Carriage Return command.
 * The Microsoft Windows operating system uses a Carriage Return/Line Feed command.
 * The UNIX operating system uses a Line Feed command.



WORKAROUND
To work around this behavior, make sure that all the line breaks in the source file consist of a Carriage Return/Line Feed command.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.



The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Keywords: kbtshoot kbbug KB899146

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.