dotnet / dotnet/dotnet-api-docs

Debug does not have property Listeners in net-core, how can I debug just like before?

Open
#1,692 0 comments 1 reaction 0 assignees View on GitHub
area-System.Diagnostics dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

https://stackoverflow.com/questions/54342622/it-seems-that-debug-listeners-does-not-exist-in-net-core

Debug dose not have property `Listeners` now, how can I debug my application just like the example:

Debug.Listeners.Add(new TextWriterTraceListener(Console.Out)); //error
Debug.AutoFlush = true;
Debug.Indent();
Debug.WriteLine("Entering Main");

---
#### Document details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: d146a96f-b6d3-bb92-23a8-2967a05445f5
* Version Independent ID: 00211a47-71a0-16bd-6e7b-88bb1b11fadd
* Content: [Debug Class (System.Diagnostics)](https://docs.microsoft.com/en-gb/dotnet/api/system.diagnostics.debug?view=netcore-2.1)
* Content Source: [xml/System.Diagnostics/Debug.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Diagnostics/Debug.xml)
* Product: **dotnet-api**
* GitHub Login: @mairaw
* Microsoft Alias: **mairaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.