Microsoft KB Archive/814904

= BUG: The debugger does not display escape sequence characters correctly in Visual Studio .NET =

Article ID: 814904

Article Last Modified on 8/18/2005

-

APPLIES TO


 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Academic Edition
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer

-



SYMPTOMS
The debugger does not display escape sequence characters correctly in debug windows (auto, watch and local) while debugging an application. The debugger displays non-printable characters instead of displaying the escape sequence characters.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
 In Visual Studio .NET, create a Visual C# Console Application project. By default, Class1.cs is created.  Replace the existing code in Class1.cs with the following code: using System;

namespace ConsoleApplication1 {   class Class1 {       [STAThread] static void Main(string[] args) {           char c1 = '\0'; char c2 = '\t'; char c3 = '\r'; }   } }  On the Debug menu, click Step Over. Perform step 3 until the control moves beyond the last statement of the Main function. Drag the c1 variable to the Name field of the Watch window. Follow step 5 for variables c2 and c3.</ol>

Notice that the Watch Window displays the value of variables as described in the &quot;Symptoms&quot; section of this article.

Note For this example, you expect the display for variables c1, c2 and c3 to appear as follows: Name          Value --- c1            0  '\0' c2            9  '\t' c3            13 '\r'

Keywords: kbbug kbdebug kbvs2002sp1sweep KB814904

-

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

© Microsoft Corporation. All rights reserved.