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 (899146)



The information in this article applies to:

  • Microsoft Visual C++ 2005 Express Edition
  • Microsoft Visual C++ .NET (2003)
  • Microsoft Visual C++ .NET (2002)
  • Microsoft Visual C++, 32-bit Editions 6.0

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 "line #1". 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 "line #1".

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 "Applies to" 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.

Modification Type:MajorLast Reviewed:1/16/2006
Keywords:kbtshoot kbbug KB899146 kbAudDeveloper