How can I connect to a process in Visual Studio?

Is there a quick way to connect to a process in vs .net 2008 (joining an IIS process)?

Every time I stop the debugger and want to restart, I need to go to Debug -> attach to process -> select aspnet_web.exe

+3
source share
2 answers

You can record a macro to do this. In VS2005, I did this:

  • ctrl-shift-R (start recording)
  • ctrl-alt-P (joins the process)
  • select process
  • Ok
  • ctrl-shift-R (stop recording)

To play a temporary macro, ctrl-shift-P. He generated the following code in the Macros IDE:

Sub TemporaryMacro()
    Try
        Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger
        Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default")
        Dim dbgeng(1) As EnvDTE80.Engine
        dbgeng(0) = trans.Engines.Item("Native")
        Dim proc2 As EnvDTE80.Process2 = dbg2.GetProcesses(trans, "<machine-name>").Item("cmd.exe")
        proc2.Attach2(dbgeng)
    Catch ex As System.Exception
        MsgBox(ex.Message)
    End Try

End Sub

Macros IDE, "--".

+10

Ctrl + Alt + P aspnet_web.exe , Win XP.

0

Source: https://habr.com/ru/post/1708848/


All Articles