Aracılığıyla paylaş


Process3.Attach2 Yöntem (Object)

Benzer şekilde Attach, dışında bir altyapı veya alt yapıları kümesi belirtmenize olanak sağlar, bu işlem eklemek hata ayıklayıcı neden olur.

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

Sözdizimi

'Bildirim
Sub Attach2 ( _
    Engines As Object _
)
void Attach2(
    Object Engines
)
void Attach2(
    [InAttribute] Object^ Engines
)
abstract Attach2 : 
        Engines:Object -> unit 
function Attach2(
    Engines : Object
)

Parametreler

Notlar

Attach2Belirli hata ayıklama alt yapısı veya alt yapıları kümesi kullanarak bir işleme izin verir.Engines Parametresi, bir tek bstr, BSTRs, tek bir topluluğu olabilir Engine nesne veya topluluğu Engine nesneler.Alt yapısı adı veya kimliği (GUID) ilk birkaç karakteri, bstr belirtirseniz, sağlanabilir.Motorları listesi için belirli bir verilen Transport.

Örnekler

' Macro code.
' The examples below illustrate how to attach to default, local, and 
' remote processes.
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
Imports Microsoft.VisualBasic.ControlChars

Public Module Module1

    Sub NativeAttachToLocalCalc()
        Dim dbg2 As EnvDTE90.Debugger3
        dbg2 = DTE.Debugger

        Dim attached As Boolean = False
        Dim proc As EnvDTE90.Process3
        For Each proc In DTE.Debugger.LocalProcesses
            If (Right(proc.Name, 8) = "calc.exe") Then
                proc.Attach2("native")
                attached = True
                Exit For
            End If
        Next

        If attached = False Then
            If attached = False Then
                MsgBox("calc.exe isn't running")
            End If
        End If
    End Sub

    Sub DefaultAttachToLocalCalc()
        Dim dbg2 As EnvDTE90.Debugger3
        dbg2 = DTE.Debugger

        Dim attached As Boolean = False
        Dim proc As EnvDTE90.Process3
        For Each proc In DTE.Debugger.LocalProcesses
            If (Right(proc.Name, 8) = "calc.exe") Then
                proc.Attach2()
                attached = True
                Exit For
            End If
        Next

        If attached = False Then
            If attached = False Then
                MsgBox("calc.exe isn't running")
            End If
        End If
    End Sub
End Module

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Process3 Arabirim

Attach2 Fazla Yük

EnvDTE90 Ad Alanı