Macro to Attach VS to any process for debugging

Posted by Vikas413 under VB.NET category on | Points: 40 | Views : 3056

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
End If
End Sub

Comments or Responses

Login to post response