DebuggerStepThroughAttribute Classe

Definizione

Indica al debugger di eseguire il codice un'istruzione alla volta anziché eseguire un'istruzione nel codice. La classe non può essere ereditata.

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
Ereditarietà
DebuggerStepThroughAttribute
Attributi

Commenti

Questo attributo viene fornito per l'utilizzo da parte dei debugger del codice sorgente; Common Language Runtime non è interessato da tale attributo. Ad esempio, il debugger di Visual Studio non si arresta in un metodo contrassegnato con questo attributo anche se viene impostato un punto di interruzione nel metodo.

L'attributo DebuggerStepThroughAttribute influisce sulla funzionalità Just My Code (JMC) di Visual Studio nei modi seguenti:

  • Se JMC è abilitato, il debugger Visual Studio non verrà arrestato in corrispondenza di un punto di interruzione in un metodo contrassegnato con l'attributo DebuggerStepThroughAttribute .

  • Se JMC è disabilitato, il debugger si arresta in corrispondenza del punto di interruzione anche se il metodo è contrassegnato con .DebuggerStepThroughAttribute

Nel codice seguente viene illustrato l'utilizzo dell'attributo da parte del compilatore Visual Basic.

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

Con questo attributo si evita di eseguire l'istruzione del codice fornito dal compilatore e viene eseguita solo l'istruzione del codice fornito dallo sviluppatore. Ad esempio, se si esegue l'istruzione del codice usando la chiave F11 (Esegui istruzione) , l'attributo causerà il comportamento del passaggio come una chiave F10 (Esegui istruzione/istruzione) per il codice fornito dal compilatore. Il metodo non verrà inserito, ma verrà eseguito.

Per altre informazioni sull'uso degli attributi, vedere Attributi.

Costruttori

DebuggerStepThroughAttribute()

Inizializza una nuova istanza della classe DebuggerStepThroughAttribute.

Proprietà

TypeId

Quando è implementata in una classe derivata, ottiene un identificatore univoco della classe Attribute.

(Ereditato da Attribute)

Metodi

Equals(Object)

Restituisce un valore che indica se questa istanza è uguale a un oggetto specificato.

(Ereditato da Attribute)
GetHashCode()

Restituisce il codice hash per l'istanza.

(Ereditato da Attribute)
GetType()

Ottiene l'oggetto Type dell'istanza corrente.

(Ereditato da Object)
IsDefaultAttribute()

In caso di override in una classe derivata, indica se il valore di questa istanza è il valore predefinito per la classe derivata.

(Ereditato da Attribute)
Match(Object)

Quando è sottoposto a override in una classe derivata, restituisce un valore che indica se questa istanza equivale a un oggetto specificato.

(Ereditato da Attribute)
MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)

Implementazioni dell'interfaccia esplicita

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

Esegue il mapping di un set di nomi a un set corrispondente di ID dispatch.

(Ereditato da Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Recupera le informazioni sul tipo relative a un oggetto, che possono essere usate per ottenere informazioni sul tipo relative a un'interfaccia.

(Ereditato da Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Recupera il numero delle interfacce di informazioni sul tipo fornite da un oggetto (0 o 1).

(Ereditato da Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Fornisce l'accesso a proprietà e metodi esposti da un oggetto.

(Ereditato da Attribute)

Si applica a