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



The information in this article applies to:

  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Academic Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition

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.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. In Visual Studio .NET, create a Visual C# Console Application project. By default, Class1.cs is created.
  2. 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';
    		}
    	}
    }
  3. On the Debug menu, click Step Over.
  4. Perform step 3 until the control moves beyond the last statement of the Main function.
  5. Drag the c1 variable to the Name field of the Watch window.
  6. Follow step 5 for variables c2 and c3.
Notice that the Watch Window displays the value of variables as described in the "Symptoms" 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'


Modification Type:MinorLast Reviewed:8/18/2005
Keywords:kbvs2002sp1sweep kbDebug kbBug KB814904 kbAudDeveloper kbAudITPRO