With the following code
C#using System;
using System.Diagnostics;
namespace CodeRushIssue
{
[DebuggerDisplay( "{DebugString}" )]
public class Foo
{
private string DebugString => "Foo";
}
}
and the "Remove unused members" option checked in Code Cleanup I get the following result when I run Code Cleanup
C#using System;
using System.Diagnostics;
namespace CodeRushIssue
{
[DebuggerDisplay( "{DebugString}" )]
public class Foo
{
}
}
Which results in "error CS0103: The name 'DebugString' does not exist in the current context" displayed in the debugger when I inspect variables of type Foo.
Hi Dominic,
Thank you for pointing out this issue and providing the code sample. I have reproduced this issue and we are working to fix this behavior. We will notify you of our results.