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

Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited. More...

Inheritance diagram for System.Diagnostics.DebuggableAttribute:
[legend]
Collaboration diagram for System.Diagnostics.DebuggableAttribute:
[legend]

Public Types

enum  DebuggingModes {
  DebuggingModes.None = 0x0, DebuggingModes.Default = 0x1, DebuggingModes.DisableOptimizations = 0x100, DebuggingModes.IgnoreSymbolStoreSequencePoints = 0x2,
  DebuggingModes.EnableEditAndContinue = 0x4
}
 Specifies the debugging mode for the just-in-time (JIT) compiler. More...
 

Public Member Functions

 DebuggableAttribute (bool isJITTrackingEnabled, bool isJITOptimizerDisabled)
 Initializes a new instance of the T:System.Diagnostics.DebuggableAttribute class, using the specified tracking and optimization options for the just-in-time (JIT) compiler. More...
 
 DebuggableAttribute (DebuggingModes modes)
 Initializes a new instance of the T:System.Diagnostics.DebuggableAttribute class, using the specified debugging modes for the just-in-time (JIT) compiler. More...
 
- Public Member Functions inherited from System.Attribute
override bool Equals (object obj)
 Returns a value that indicates whether this instance is equal to a specified object. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
virtual bool Match (object obj)
 When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. More...
 
virtual bool IsDefaultAttribute ()
 When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. More...
 

Public Attributes

bool IsJITTrackingEnabled => (m_debuggingModes & DebuggingModes.Default) != DebuggingModes.None
 Gets a value that indicates whether the runtime will track information during code generation for the debugger. More...
 
bool IsJITOptimizerDisabled => (m_debuggingModes & DebuggingModes.DisableOptimizations) != DebuggingModes.None
 Gets a value that indicates whether the runtime optimizer is disabled. More...
 
DebuggingModes DebuggingFlags => m_debuggingModes
 Gets the debugging modes for the attribute. More...
 
- Public Attributes inherited from System.Attribute
virtual object TypeId => GetType()
 When implemented in a derived class, gets a unique identifier for this T:System.Attribute. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from System.Attribute
static Attribute [] GetCustomAttributes (MemberInfo element, Type type)
 Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for. More...
 
static Attribute [] GetCustomAttributes (MemberInfo element, Type type, bool inherit)
 Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. More...
 
static Attribute [] GetCustomAttributes (MemberInfo element)
 Retrieves an array of the custom attributes applied to a member of a type. A parameter specifies the member. More...
 
static Attribute [] GetCustomAttributes (MemberInfo element, bool inherit)
 Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. More...
 
static bool IsDefined (MemberInfo element, Type attributeType)
 Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for. More...
 
static bool IsDefined (MemberInfo element, Type attributeType, bool inherit)
 Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. More...
 
static Attribute GetCustomAttribute (MemberInfo element, Type attributeType)
 Retrieves a custom attribute applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for. More...
 
static Attribute GetCustomAttribute (MemberInfo element, Type attributeType, bool inherit)
 Retrieves a custom attribute applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. More...
 
static Attribute [] GetCustomAttributes (ParameterInfo element)
 Retrieves an array of the custom attributes applied to a method parameter. A parameter specifies the method parameter. More...
 
static Attribute [] GetCustomAttributes (ParameterInfo element, Type attributeType)
 Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for. More...
 
static Attribute [] GetCustomAttributes (ParameterInfo element, Type attributeType, bool inherit)
 Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter. More...
 
static Attribute [] GetCustomAttributes (ParameterInfo element, bool inherit)
 Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and whether to search ancestors of the method parameter. More...
 
static bool IsDefined (ParameterInfo element, Type attributeType)
 Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for. More...
 
static bool IsDefined (ParameterInfo element, Type attributeType, bool inherit)
 Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter. More...
 
static Attribute GetCustomAttribute (ParameterInfo element, Type attributeType)
 Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for. More...
 
static Attribute GetCustomAttribute (ParameterInfo element, Type attributeType, bool inherit)
 Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter. More...
 
static Attribute [] GetCustomAttributes (Module element, Type attributeType)
 Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and the type of the custom attribute to search for. More...
 
static Attribute [] GetCustomAttributes (Module element)
 Retrieves an array of the custom attributes applied to a module. A parameter specifies the module. More...
 
static Attribute [] GetCustomAttributes (Module element, bool inherit)
 Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and an ignored search option. More...
 
static Attribute [] GetCustomAttributes (Module element, Type attributeType, bool inherit)
 Retrieves an array of the custom attributes applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option. More...
 
static bool IsDefined (Module element, Type attributeType)
 Determines whether any custom attributes of a specified type are applied to a module. Parameters specify the module, and the type of the custom attribute to search for. More...
 
static bool IsDefined (Module element, Type attributeType, bool inherit)
 Determines whether any custom attributes are applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option. More...
 
static Attribute GetCustomAttribute (Module element, Type attributeType)
 Retrieves a custom attribute applied to a module. Parameters specify the module, and the type of the custom attribute to search for. More...
 
static Attribute GetCustomAttribute (Module element, Type attributeType, bool inherit)
 Retrieves a custom attribute applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option. More...
 
static Attribute [] GetCustomAttributes (Assembly element, Type attributeType)
 Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for. More...
 
static Attribute [] GetCustomAttributes (Assembly element, Type attributeType, bool inherit)
 Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option. More...
 
static Attribute [] GetCustomAttributes (Assembly element)
 Retrieves an array of the custom attributes applied to an assembly. A parameter specifies the assembly. More...
 
static Attribute [] GetCustomAttributes (Assembly element, bool inherit)
 Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and an ignored search option. More...
 
static bool IsDefined (Assembly element, Type attributeType)
 Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for. More...
 
static bool IsDefined (Assembly element, Type attributeType, bool inherit)
 Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option. More...
 
static Attribute GetCustomAttribute (Assembly element, Type attributeType)
 Retrieves a custom attribute applied to a specified assembly. Parameters specify the assembly and the type of the custom attribute to search for. More...
 
static Attribute GetCustomAttribute (Assembly element, Type attributeType, bool inherit)
 Retrieves a custom attribute applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option. More...
 
- Protected Member Functions inherited from System.Attribute
 Attribute ()
 Initializes a new instance of the T:System.Attribute class. More...
 

Detailed Description

Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited.

Definition at line 9 of file DebuggableAttribute.cs.

Member Enumeration Documentation

◆ DebuggingModes

Specifies the debugging mode for the just-in-time (JIT) compiler.

Enumerator
None 

Starting with the .NET Framework version 2.0, JIT tracking information is always generated, and this flag has the same effect as F:System.Diagnostics.DebuggableAttribute.DebuggingModes.Default, except that it sets the P:System.Diagnostics.DebuggableAttribute.IsJITTrackingEnabled property to false. However, because JIT tracking is always enabled, the property value is ignored in version 2.0 or later. Note that, unlike the F:System.Diagnostics.DebuggableAttribute.DebuggingModes.None flag, the F:System.Diagnostics.DebuggableAttribute.DebuggingModes.None flag cannot be used to disable JIT optimizations.

Default 

Instructs the just-in-time (JIT) compiler to use its default behavior, which includes enabling optimizations, disabling Edit and Continue support, and using symbol store sequence points if present. Starting with the .NET Framework version 2.0, JIT tracking information, the Microsoft intermediate language (MSIL) offset to the native-code offset within a method, is always generated.

DisableOptimizations 

Disable optimizations performed by the compiler to make your output file smaller, faster, and more efficient. Optimizations result in code rearrangement in the output file, which can make debugging difficult. Typically optimization should be disabled while debugging. In versions 2.0 or later, combine this value with Default (Default | DisableOptimizations) to enable JIT tracking and disable optimizations.

IgnoreSymbolStoreSequencePoints 

Use the implicit MSIL sequence points, not the program database (PDB) sequence points. The symbolic information normally includes at least one Microsoft intermediate language (MSIL) offset for each source line. When the just-in-time (JIT) compiler is about to compile a method, it asks the profiling services for a list of MSIL offsets that should be preserved. These MSIL offsets are called sequence points.

EnableEditAndContinue 

Enable edit and continue. Edit and continue enables you to make changes to your source code while your program is in break mode. The ability to edit and continue is compiler dependent.

Definition at line 15 of file DebuggableAttribute.cs.

Constructor & Destructor Documentation

◆ DebuggableAttribute() [1/2]

System.Diagnostics.DebuggableAttribute.DebuggableAttribute ( bool  isJITTrackingEnabled,
bool  isJITOptimizerDisabled 
)

Initializes a new instance of the T:System.Diagnostics.DebuggableAttribute class, using the specified tracking and optimization options for the just-in-time (JIT) compiler.

Parameters
isJITTrackingEnabledtrue to enable debugging; otherwise, false.
isJITOptimizerDisabledtrue to disable the optimizer for execution; otherwise, false.

Definition at line 55 of file DebuggableAttribute.cs.

◆ DebuggableAttribute() [2/2]

System.Diagnostics.DebuggableAttribute.DebuggableAttribute ( DebuggingModes  modes)

Initializes a new instance of the T:System.Diagnostics.DebuggableAttribute class, using the specified debugging modes for the just-in-time (JIT) compiler.

Parameters
modesA bitwise combination of the T:System.Diagnostics.DebuggableAttribute.DebuggingModes values specifying the debugging mode for the JIT compiler.

Definition at line 71 of file DebuggableAttribute.cs.

Member Data Documentation

◆ DebuggingFlags

DebuggingModes System.Diagnostics.DebuggableAttribute.DebuggingFlags => m_debuggingModes

Gets the debugging modes for the attribute.

Returns
A bitwise combination of the T:System.Diagnostics.DebuggableAttribute.DebuggingModes values describing the debugging mode for the just-in-time (JIT) compiler. The default is F:System.Diagnostics.DebuggableAttribute.DebuggingModes.Default.

Definition at line 48 of file DebuggableAttribute.cs.

◆ IsJITOptimizerDisabled

bool System.Diagnostics.DebuggableAttribute.IsJITOptimizerDisabled => (m_debuggingModes & DebuggingModes.DisableOptimizations) != DebuggingModes.None

Gets a value that indicates whether the runtime optimizer is disabled.

Returns
true if the runtime optimizer is disabled; otherwise, false.

Definition at line 44 of file DebuggableAttribute.cs.

◆ IsJITTrackingEnabled

bool System.Diagnostics.DebuggableAttribute.IsJITTrackingEnabled => (m_debuggingModes & DebuggingModes.Default) != DebuggingModes.None

Gets a value that indicates whether the runtime will track information during code generation for the debugger.

Returns
true if the runtime will track information during code generation for the debugger; otherwise, false.

Definition at line 39 of file DebuggableAttribute.cs.


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