DebuggerStepThroughAttribute Clase

Definición

Indica al depurador que recorra el código en lugar de ejecutarlo paso a paso. Esta clase no puede heredarse.

public ref class DebuggerStepThroughAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, Inherited=false)]
public sealed class DebuggerStepThroughAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, Inherited=false)]
[System.Serializable]
public sealed class DebuggerStepThroughAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, Inherited=false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class DebuggerStepThroughAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, Inherited=false)>]
type DebuggerStepThroughAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, Inherited=false)>]
[<System.Serializable>]
type DebuggerStepThroughAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, Inherited=false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type DebuggerStepThroughAttribute = class
    inherit Attribute
Public NotInheritable Class DebuggerStepThroughAttribute
Inherits Attribute
Herencia
DebuggerStepThroughAttribute
Atributos

Comentarios

Este atributo se proporciona para que lo usen los depuradores de código fuente; Common Language Runtime no se ve afectado por él. Por ejemplo, el depurador de Visual Studio no se detiene en un método marcado con este atributo incluso si se establece un punto de interrupción en el método .

El DebuggerStepThroughAttribute atributo afecta a la característica Just My Code (JMC) de Visual Studio de las siguientes maneras:

  • Si JMC está habilitado, el depurador de Visual Studio no se detendrá en un punto de interrupción de un método marcado con el DebuggerStepThroughAttribute atributo .

  • Si JMC está deshabilitado, el depurador se detiene en el punto de interrupción aunque el método esté marcado con DebuggerStepThroughAttribute.

En el código siguiente se muestra cómo el compilador de Visual Basic usa el atributo .

<System.Diagnostics.DebuggerStepThrough()> _  
    Private Sub InitializeComponent()  
        components = New System.ComponentModel.Container()  
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font  
        Me.Text = "Form1"  
    End Sub  

Este atributo evita tener que ir paso a paso por el código proporcionado por el compilador y solo pasos en el código proporcionado por el desarrollador. Por ejemplo, si va a recorrer el código mediante la clave F11 (Paso a paso), el atributo hará que el paso se comporte como una clave F10 (Paso a paso por encima) para el código proporcionado por el compilador. El método no se interrumpa, pero se ejecutará.

Para obtener más información sobre el uso de atributos, vea Atributos.

Constructores

DebuggerStepThroughAttribute()

Inicializa una nueva instancia de la clase DebuggerStepThroughAttribute.

Propiedades

TypeId

Cuando se implementa en una clase derivada, obtiene un identificador único para este Attribute.

(Heredado de Attribute)

Métodos

Equals(Object)

Devuelve un valor que indica si esta instancia es igual que un objeto especificado.

(Heredado de Attribute)
GetHashCode()

Devuelve el código hash de esta instancia.

(Heredado de Attribute)
GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
IsDefaultAttribute()

Si se reemplaza en una clase derivada, indica si el valor de esta instancia es el valor predeterminado de la clase derivada.

(Heredado de Attribute)
Match(Object)

Cuando se invalida en una clase derivada, devuelve un valor que indica si esta instancia es igual a un objeto especificado.

(Heredado de Attribute)
MemberwiseClone()

Crea una copia superficial del Object actual.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Implementaciones de interfaz explícitas

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Asigna un conjunto de nombres a un conjunto correspondiente de identificadores de envío.

(Heredado de Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Obtiene la información de tipos de un objeto, que puede utilizarse para obtener la información de tipos de una interfaz.

(Heredado de Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Recupera el número de interfaces de información de tipo que proporciona un objeto (0 ó 1).

(Heredado de Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Proporciona acceso a las propiedades y los métodos expuestos por un objeto.

(Heredado de Attribute)

Se aplica a