For ASP.NET development (IIS, Development Server, Cassini, or whatever) this can be a pain. You need to:
- Open the "Attach to..." window.
- Find the process (web server) you are interested in.
- Attach, wait and close the window.
Of course you will need to alter the name of the process to look for depending on your web server (IIS 5 will typically need "aspnet_wp.exe", IIS 6 depends on the process mode you choose to run in).
I must apologise, the idea for this macro was taken from a source I can't locate anymore. The code is slightly modified, but the idea is the same.
' This subroutine attaches to the first Development Web Server found.
Sub AttachToFirstDevWebServer()
Dim process As EnvDTE.Process
For Each process In DTE.Debugger.LocalProcesses
If (Path.GetFileName(process.Name) = "UltiDevCassinWebServer2a.exe") Then
process.Attach()
Exit Sub
End If
Next
MsgBox("No ASP.NET Development Server found")
End Sub