Compartir a través de


Breakpoint2.FunctionName (Propiedad)

Obtiene el nombre de la función que contiene el punto de interrupción.

Espacio de nombres:  EnvDTE80
Ensamblado:  EnvDTE80 (en EnvDTE80.dll)

Sintaxis

'Declaración
ReadOnly Property FunctionName As String
string FunctionName { get; }
property String^ FunctionName {
    String^ get ();
}
abstract FunctionName : string with get
function get FunctionName () : String

Valor de propiedad

Tipo: String
Cadena que contiene el nombre de la función.

Ejemplos

En el siguiente ejemplo se muestra cómo utilizar la propiedad FunctionName.

Para probar esta propiedad:

  1. Establezca un punto de interrupción en la aplicación de destino.

  2. Ejecute el complemento.

public static void FunctionName (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("FunctionName 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("Breakpoint in the file " + debugger.Breakpoints.Item(1).File);
    owp.OutputString(" on line " +
                     debugger.Breakpoints.Item(1).FileLine.ToString() + " column ");
    owp.OutputString(debugger.Breakpoints.Item(1).FileColumn.ToString() + " is ");
    owp.OutputString(debugger.Breakpoints.Item(1).Enabled ? "enabled." : "disabled.");
    owp.OutputString("\nThis breakpoint is in the function: " +
                     debugger.Breakpoints.Item(1).FunctionName);
}

Seguridad de .NET Framework

Vea también

Referencia

Breakpoint2 Interfaz

EnvDTE80 (Espacio de nombres)

Otros recursos

Cómo: Compilar y ejecutar los ejemplos de código del modelo de objetos de automatización