Aracılığıyla paylaş


Debugger3.CurrentStackFrame Özellik

Alır veya ayarlar geçerli yığın çerçevesi.

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

Sözdizimi

'Bildirim
Property CurrentStackFrame As StackFrame
    Get
    Set
StackFrame CurrentStackFrame { get; set; }
property StackFrame^ CurrentStackFrame {
    StackFrame^ get ();
    void set (StackFrame^ value);
}
abstract CurrentStackFrame : StackFrame with get, set
function get CurrentStackFrame () : StackFrame
function set CurrentStackFrame (value : StackFrame)

Özellik Değeri

Tür: EnvDTE.StackFrame
StackFrame nesnesi

Yüklenen

Debugger2.CurrentStackFrame

Açıklamalar

Yığın çerçevesi hakkında daha fazla bilgi için bkz: Memory Management: Frame Allocation.

Örnekler

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

Bu özellik test etmek için:

  1. Bir kesme noktası hedef uygulamada ayarlayın. Eklentiyi çalıştırın.

    Geçerli yığın çerçevesi boştur.

  2. Bir kesme noktası hedef uygulamada ayarlayın. Hedef uygulama hata ayıklama modunda çalıştırın. Program bir kesme noktasında durur, eklentiyi çalıştırın.

    Geçerli yığın çerçevesi, yöntemin adı ve dönüş türü içerir.

public static void CurrentStackFrame(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("Current StackFrame 
    Test");
    owp.Activate();

    owp.OutputString("Current Stack Frame Info: ");
    EnvDTE90.Debugger3 debugger = (EnvDTE90.Debugger3)dte.Debugger;
    EnvDTE.StackFrame sf = debugger.CurrentStackFrame;
    if (sf == null)
        owp.OutputString("No program is being debugged, Stack Frame is 
        empty.");
    else
        owp.OutputString("Function " + sf.FunctionName +
                         " returns type " + sf.ReturnType);
}
Sub ShowCurrentProcess()
    ' This function displays the current debugger
    ' mode in the output window.
    Dim ow As OutputWindow
    ow = DTE2.Windows.Item(Constants.vsWindowKindOutput).Object

    Dim proc As EnvDTE.Process2
    proc = DTE2.Debugger.CurrentProcess

    If (proc Is Nothing) Then
        ow.ActivePane.OutputString("No process is being debugged")
    Else
        ow.ActivePane.OutputString("" + Str(proc.ProcessID) + ": " + _
        proc.Name + vbCrLf)
    End If
End Sub

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Debugger3 Arabirim

CurrentStackFrame Fazla Yük

EnvDTE90 Ad Alanı