Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Process.Attach Method

Causes the debugger to attach this process.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)
void Attach()

The following example demonstrates how to use the Attach method.

To test this method

  1. Run the target application in the nondebug mode. Make sure that the application contains an infinite loop.

  2. Run the add-in.

  3. Set the breakpoint inside the infinite loop.

public static void Attach(DTE dte)
    EnvDTE.Processes processes = dte.Debugger.LocalProcesses;
    foreach(EnvDTE.Process proc in processes)
        if(proc.Name.IndexOf("Target.exe") != -1)
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.