While working with SharePoint development, many times you need to attach Visual Studio to running web server for debugging purpose.
So here is a simple VB macro to achieve the same.
you can use it for any process. you will need to replace 'W3WP.EXE' with other executable which loads your assembly/code.
Public Sub AttachToSPSites()
For Each process As EnvDTE.Process In DTE.Debugger.LocalProcesses
If (process.Name.IndexOf("W3Wp.exe") <> -1) Then