The project I'm currently working on has a large codebase and it takes a while with precompilation and everything if I press F5 to start the project every time. I therefore started to attach and detach the debugger manually every time I needed to debug. This saves me tons of time since I don't have to log in and out of the application and find the place I need to debug every time something has to be debugged. A former coworker(
http://www.labraaten.com/) also made this nice little macro to attach to w3wp.exe(aspnet_wp.exe in XP) automatically. Saves me even more time.
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports System.Diagnostics
Public Module Module1
Public Sub Attach_ASPNET_WP()
Attach("w3wp.exe")
Attach("iexplore.exe")
End Sub
Public Sub Attach(ByVal processName As String)
For Each process As EnvDTE.Process In DTE.Debugger.LocalProcesses
If process.Name.IndexOf(processName) <> -1 Then
process.Attach()
End If
Next
End Sub
End Module
I have added this macro as a shortcut that triggers every time I hit ALT-I. This can be set by pressing tools, Options, keyboard, locating your macro and add the shortcut.