Use Trace for legacy shared Debug settings

Proprietary

Port resolved Debug.Listeners and Debug.AutoFlush reads/writes to Trace.Listeners and Trace.AutoFlush, which share their Framework TraceInternal backing state. Modern Trace.Listeners initializes the Debug trace provider; modern Debug.AutoFlush is constant true with a no-op setter. Preserve collection operations, values and output-call conditional attributes; do not rewrite Debug/Trace output methods or compile symbols. Support aliases/static imports; leave custom/unresolved members, discarded selector comments, lambda/query contexts and snapshots unchanged. This does not migrate external diagnostics configuration or emulate Framework CAS demands.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.UseTraceForLegacyDebugSettings
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.UseTraceForLegacyDebugSettings

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.