Jul 16 2010
Debug IIS Macro for Visual Studio
This is a little macro that you can use in Visual Studio to make it easy to attach to the w3wp processes that are spawned by IIS:
Public Sub AttachToWebServer()
Dim process As EnvDTE.Process
For Each process In DTE.Debugger.LocalProcesses
System.Diagnostics.Debug.Print(process.Name)
If (Path.GetFileName(process.Name).ToLower() = "w3wp.exe") Then
process.Attach()
End If
Next
End Sub
I should point out that in Windows 7 and Windows Server 2008 you will need to run Visual Studio as Administrator, or disable UAC.
Thanks just wat I googled for “debug iis macro” top hit.