Aracılığıyla paylaş


Debugger3.CurrentProcess Özellik

Alır veya ayarlar etkin işlem.

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

Sözdizimi

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

Özellik Değeri

Tür: EnvDTE.Process
Process nesnesi

Yüklenen

Debugger2.CurrentProcess

Açıklamalar

Etkin işlem hata ayıklayıcı tarafından görüntülenen verileri tanımlayan işlemidir. Aynı anda birden fazla işlem hata ayıklama hata ayıklayıcı desteklemesine rağmen belirli bir anda yalnızca bir işlem etkin olabilir. Daha fazla bilgi için bkz. Birden çok İşlemler hata ayıklama.

Örnekler

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

Bu özellik test etmek için:

  1. Hedef uygulama açın. Eklentiyi çalıştırın.

    Hiçbir işlem ayıklanacak.

  2. Bir kesme noktası hedef uygulamada ayarlayın. Uygulama hata ayıklama modunda çalıştırın.

  3. Program bir kesme noktasında durur, eklentiyi çalıştırın.

    İşlem ayıklanacak.

public static void CurrentProcess(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 Process 
    Test");
    owp.Activate();

    owp.OutputString("Current Process Info: ");
    EnvDTE90.Debugger3 debugger = (EnvDTE90.Debugger3)dte.Debugger;
    EnvDTE90.Process2 process = (EnvDTE90.Process2)debugger.CurrentProcess;

    if (process == null)
        owp.OutputString("No process is being debugged");
    else
        owp.OutputString("Process ID = " + process.ProcessID +
                         "  Process Name = " + process.Name);
}
Sub ShowCurrentProcess()
    ' This function displays the current debugger
    ' mode in the output window.
    Dim ow As OutputWindow
    ow = dte.Windows.Item(Constants.vsWindowKindOutput).Object

    Dim proc As EnvDTE90.Process3
    proc = dte.Debugger.CurrentProcess

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

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Debugger3 Arabirim

CurrentProcess Fazla Yük

EnvDTE90 Ad Alanı