Partager via


Breakpoint2.LocationType, propriété

Obtient le type d'emplacement représenté par le point d'arrêt.

Espace de noms :  EnvDTE80
Assembly :  EnvDTE80 (dans EnvDTE80.dll)

Syntaxe

'Déclaration
ReadOnly Property LocationType As dbgBreakpointLocationType
dbgBreakpointLocationType LocationType { get; }
property dbgBreakpointLocationType LocationType {
    dbgBreakpointLocationType get ();
}
abstract LocationType : dbgBreakpointLocationType with get
function get LocationType () : dbgBreakpointLocationType

Valeur de propriété

Type : dbgBreakpointLocationType
Une des valeurs de dbgBreakpointLocationType.

Notes

Un point d'arrêt peut être défini dans une fonction, un fichier, une variable, ou à une adresse mémoire spécifique. Pour plus d'informations, consultez Breakpoints and Tracepoints.

Exemples

L'exemple suivant illustre l'utilisation de la propriété LocationType.

Pour tester cette propriété :

  1. Définissez un point d'arrêt dans l'application cible.

  2. Définissez plusieurs propriétés de point d'arrêt dans la boîte de dialogue Propriétés/Nombre d'accès.

  3. Exécutez le complément.

public static void LocationType(EnvDTE80.DTE2 dte)
{
    // Setup debug Output window.
    Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
    w.Visible = true;
    OutputWindow ow = (OutputWindow)w.Object;
    OutputWindowPane owp = ow.OutputWindowPanes.Add("LocationType property: ");
    owp.Activate();

    // dte is a reference to the DTE2 object passed to you by the
    // OnConnection method that you implement when you create an Add-in.
    EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)dte.Debugger;
    owp.OutputString("HitCountTarget: " +
                        debugger.Breakpoints.Item(1).HitCountTarget);
    owp.OutputString("\nHitCountType: " +
                        debugger.Breakpoints.Item(1).HitCountType);
    owp.OutputString("\nLocationType: " +
                        debugger.Breakpoints.Item(1).LocationType);
    owp.OutputString("\nName: " + debugger.Breakpoints.Item(1).Name);
    debugger.Breakpoints.Item(1).Tag = "My Breakpoint";
    owp.OutputString("\nTag: " + debugger.Breakpoints.Item(1).Tag);
    owp.OutputString("\nType: " + debugger.Breakpoints.Item(1).Type); 
}

Sécurité .NET Framework

Voir aussi

Référence

Breakpoint2 Interface

EnvDTE80, espace de noms

Autres ressources

Comment : compiler et exécuter les exemples de code du modèle objet Automation