Debugger.Log(Int32, String, String) Method

Definition

Posts a message for the attached debugger.

C#
public static void Log(int level, string? category, string? message);
C#
public static void Log(int level, string category, string message);

Parameters

level
Int32

A description of the importance of the message.

category
String

The category of the message.

message
String

The message to show.

Remarks

If there is no debugger attached, this method has no effect. The debugger might or might not report the message, depending upon its settings.

Note

The category parameter is limited to 256 characters. Strings longer than 256 characters are truncated.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1