Attach to IIS in Visual Studio (v2)

A better version of the process attach macro:

Sub AttachToAspNET()
            Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger
            Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default")
            Dim dbgeng(3) As EnvDTE80.Engine

            dbgeng(0) = trans.Engines.Item("T-SQL")
            dbgeng(1) = trans.Engines.Item("Managed")

            For Each theProcess As EnvDTE80.Process2 In dbg2.GetProcesses(trans, Environment.MachineName)
                If theProcess.Name.Contains("w3wp.exe") Then
                End If

        Catch ex As System.Exception
        End Try
    End Sub
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *