Created
August 4, 2010 08:38
-
-
Save jmdfm/507853 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Strict Off | |
Option Explicit Off | |
Imports System | |
Imports EnvDTE | |
Imports EnvDTE80 | |
Imports EnvDTE90 | |
Imports System.Diagnostics | |
Imports System.Security.Principal | |
Public Module DebuggingMacros | |
Sub AttachDebuggerToIis() | |
Try | |
Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger | |
Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default") | |
Dim compName As String = WindowsIdentity.GetCurrent().Name | |
compName = compName.Substring(0, compName.IndexOf("\")) | |
Dim proc2 As EnvDTE80.Process2 = dbg2.GetProcesses(trans, compName).Item("w3wp.exe") | |
proc2.Attach2(dbgeng) | |
Catch ex As System.Exception | |
MsgBox(ex.Message) | |
End Try | |
End Sub | |
End Module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment