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
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
Notlar
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 herhangi bir anda yalnızca bir işlem etkin olabilir.Daha fazla bilgi için bkz. Birden çok işlem hata ayıklama.
Örnekler
Aşağıdaki örnek, nasıl kullanılacağını gösterir CurrentProcess özelliği.
Bu özellik test etmek için:
Hedef uygulamada açın.Eklentiyi Çalıştır.
Hiçbir işlem Ayıklanacak.
Bir kesme noktası hedef uygulamada ayarlayın.Uygulama hata ayıklama modunda çalıştırın.
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
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen güvenilen kod kitaplıklarını kullanma.