System.Diagnostics.DebuggableAttribute Class

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

See Also: DebuggableAttribute Members


[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Module | System.AttributeTargets.All)]
public sealed class DebuggableAttribute : Attribute


The System.Diagnostics.DebuggableAttribute controls how the runtime treats code within the module. The runtime might track extra information about generated code, and it might disable certain optimizations based on the values contained within this attribute.

A debugger might choose to ignore the System.Diagnostics.DebuggableAttribute settings when loading an assembly. However, attaching a debugger to a running program may prevent the debugger from changing the settings because they have already been applied.

To use the System.Diagnostics.DebuggableAttribute with dynamic assemblies using the Reflection Emit erload:System.Reflection.Emit.AssemblyBuilder.DefineDynamicModule methods, emit the System.Diagnostics.DebuggableAttribute before calling the erload:System.Reflection.Emit.AssemblyBuilder.DefineDynamicModule methods to ensure that the settings are applied to the entire assembly.

For more information about using attributes, see Extending Metadata Using Attributes.


Namespace: System.Diagnostics
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0,,