This rule is deprecated; use S106 instead.
Why is this an issue?
Debug statements are always useful during development. But include them in production code - particularly in code that runs client-side - and you
run the risk of inadvertently exposing sensitive information.
Noncompliant code example
private void DoSomething()
{
// ...
Console.WriteLine("so far, so good..."); // Noncompliant
// ...
}
Exceptions
The following are ignored by this rule:
- Console Applications
- Calls in methods decorated with
[Conditional ("DEBUG")]
- Calls included in DEBUG preprocessor branches (
#if DEBUG
)
Resources