mscorlib(4.0.0.0) API with additions
System.Diagnostics.Debugger Class Reference

Enables communication with a debugger. This class cannot be inherited. More...

Public Member Functions

 Debugger ()
 Initializes a new instance of the T:System.Diagnostics.Debugger class. More...
 
static void Log (int level, string category, string message)
 Posts a message for the attached debugger. More...
 
static bool IsLogging ()
 Checks to see if logging is enabled by an attached debugger. More...
 

Static Public Member Functions

static void Break ()
 Signals a breakpoint to an attached debugger. More...
 
static bool Launch ()
 Launches and attaches a debugger to the process. More...
 
static void NotifyOfCrossThreadDependency ()
 Notifies a debugger that execution is about to enter a path that involves a cross-thread dependency. More...
 

Static Public Attributes

static readonly string DefaultCategory
 Represents the default category of message with a constant. More...
 

Properties

static bool IsAttached [get]
 Gets a value that indicates whether a debugger is attached to the process. More...
 

Detailed Description

Enables communication with a debugger. This class cannot be inherited.

Definition at line 11 of file Debugger.cs.

Constructor & Destructor Documentation

◆ Debugger()

System.Diagnostics.Debugger.Debugger ( )

Initializes a new instance of the T:System.Diagnostics.Debugger class.

Definition at line 34 of file Debugger.cs.

Member Function Documentation

◆ Break()

static void System.Diagnostics.Debugger.Break ( )
static

Signals a breakpoint to an attached debugger.

Exceptions
T:System.Security.SecurityExceptionThe T:System.Security.Permissions.UIPermission is not set to break into the debugger.

Definition at line 42 of file Debugger.cs.

◆ IsLogging()

static bool System.Diagnostics.Debugger.IsLogging ( )

Checks to see if logging is enabled by an attached debugger.

Returns
true if a debugger is attached and logging is enabled; otherwise, false. The attached debugger is the registered managed debugger in the DbgManagedDebugger registry key. For more information on this key, see Enabling JIT-Attach Debugging.

◆ Launch()

static bool System.Diagnostics.Debugger.Launch ( )
static

Launches and attaches a debugger to the process.

Returns
true if the startup is successful or if the debugger is already attached; otherwise, false.
Exceptions
T:System.Security.SecurityExceptionThe T:System.Security.Permissions.UIPermission is not set to start the debugger.

Definition at line 78 of file Debugger.cs.

◆ Log()

static void System.Diagnostics.Debugger.Log ( int  level,
string  category,
string  message 
)

Posts a message for the attached debugger.

Parameters
levelA description of the importance of the message.
categoryThe category of the message.
messageThe message to show.

◆ NotifyOfCrossThreadDependency()

static void System.Diagnostics.Debugger.NotifyOfCrossThreadDependency ( )
static

Notifies a debugger that execution is about to enter a path that involves a cross-thread dependency.

Definition at line 104 of file Debugger.cs.

Member Data Documentation

◆ DefaultCategory

readonly string System.Diagnostics.Debugger.DefaultCategory
static

Represents the default category of message with a constant.

Definition at line 18 of file Debugger.cs.

Property Documentation

◆ IsAttached

bool System.Diagnostics.Debugger.IsAttached
staticget

Gets a value that indicates whether a debugger is attached to the process.

Returns
true if a debugger is attached; otherwise, false.

Definition at line 25 of file Debugger.cs.


The documentation for this class was generated from the following file: