Aracılığıyla paylaş


Breakpoint2.FunctionName Özellik

Kesme noktası içeren işlevin adını alır.

Ad alanı:  EnvDTE80
Derleme:  EnvDTE80 (EnvDTE80.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property FunctionName As String
    Get
string FunctionName { get; }
property String^ FunctionName {
    String^ get ();
}
abstract FunctionName : string
function get FunctionName () : String

Özellik Değeri

Tür: System.String
İşlev adını içeren bir dize.

Yüklenen

Breakpoint.FunctionName

Örnekler

Aşağıdaki örnek, nasıl kullanılacağını gösterir FunctionName özelliği.

Bu özellik test etmek için:

  1. Bir kesme noktası hedef uygulamada ayarlayın.

  2. Eklentiyi çalıştırın.

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);
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Breakpoint2 Arabirim

FunctionName Fazla Yük

EnvDTE80 Ad Alanı

Diğer Kaynaklar

Nasıl Yapılır: derlemek ve otomasyon nesne modeli kod örnekleri çalıştırma