mscorlib(4.0.0.0) API with additions
DebuggableAttribute.cs
2 
3 namespace System.Diagnostics
4 {
6  [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module, AllowMultiple = false)]
7  [ComVisible(true)]
8  [__DynamicallyInvokable]
9  public sealed class DebuggableAttribute : Attribute
10  {
12  [Flags]
13  [ComVisible(true)]
14  [__DynamicallyInvokable]
15  public enum DebuggingModes
16  {
18  [__DynamicallyInvokable]
19  None = 0x0,
21  [__DynamicallyInvokable]
22  Default = 0x1,
24  [__DynamicallyInvokable]
25  DisableOptimizations = 0x100,
27  [__DynamicallyInvokable]
28  IgnoreSymbolStoreSequencePoints = 0x2,
30  [__DynamicallyInvokable]
31  EnableEditAndContinue = 0x4
32  }
33 
34  private DebuggingModes m_debuggingModes;
35 
39  public bool IsJITTrackingEnabled => (m_debuggingModes & DebuggingModes.Default) != DebuggingModes.None;
40 
44  public bool IsJITOptimizerDisabled => (m_debuggingModes & DebuggingModes.DisableOptimizations) != DebuggingModes.None;
45 
48  public DebuggingModes DebuggingFlags => m_debuggingModes;
49 
55  public DebuggableAttribute(bool isJITTrackingEnabled, bool isJITOptimizerDisabled)
56  {
57  m_debuggingModes = DebuggingModes.None;
58  if (isJITTrackingEnabled)
59  {
60  m_debuggingModes |= DebuggingModes.Default;
61  }
62  if (isJITOptimizerDisabled)
63  {
64  m_debuggingModes |= DebuggingModes.DisableOptimizations;
65  }
66  }
67 
70  [__DynamicallyInvokable]
72  {
73  m_debuggingModes = modes;
74  }
75  }
76 }
DebuggableAttribute(DebuggingModes modes)
Initializes a new instance of the T:System.Diagnostics.DebuggableAttribute class, using the specified...
Represents the base class for custom attributes.
Definition: Attribute.cs:15
Definition: __Canon.cs:3
DebuggableAttribute(bool isJITTrackingEnabled, bool isJITOptimizerDisabled)
Initializes a new instance of the T:System.Diagnostics.DebuggableAttribute class, using the specified...
Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited.
AttributeTargets
Specifies the application elements on which it is valid to apply an attribute.
bool IsJITOptimizerDisabled
Gets a value that indicates whether the runtime optimizer is disabled.
DebuggingModes DebuggingFlags
Gets the debugging modes for the attribute.
DebuggingModes
Specifies the debugging mode for the just-in-time (JIT) compiler.
bool IsJITTrackingEnabled
Gets a value that indicates whether the runtime will track information during code generation for the...
The default setting for this enumeration, which is currently F:System.GCCollectionMode....