BUG: The debugger steps erratically when you have carriage returns without line feeds (328784)
The information in this article applies to:
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C++ .NET (2002)
This article was previously published under Q328784 SYMPTOMS When you use the debugger to step through Visual C++ .NET
source code, the debugger might skip certain source lines and step erratically
through the code.
If your line endings for the source code have a
carriage return (CR) without a line feed (LF), the debugger might skip those
source lines. CAUSE In Windows, a text file has both the CR (ASCII code: 0x0D)
and the LF (ASCII code: 0x0A) together at the end of a line. However if you
only have the CR at the end of a line, Windows-based editors (for example,
Notepad.exe) display those in the same line. The Visual C++ compiler displays
the CR in the same way while creating the executable. However, the Visual
Studio .NET editor recognizes and supports various line endings, and displays
the source code in different lines. This results in an executable mismatch in
line mappings that causes the debugger to step through source code erratically.
RESOLUTION- Open the source file in the Visual Studio .NET
editor.
- On the File menu, click Advanced Save Options.
- In the Line Endings list box, click Windows (CR LF), and then click OK.
- Save the file.
- Compile the project.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
REFERENCES For additional information, see the following Microsoft
Developer Network (MSDN) Web site:
Modification Type: | Minor | Last Reviewed: | 1/5/2006 |
---|
Keywords: | kbbug kbDebug kbide kbpending KB328784 kbAudDeveloper |
---|
|