Attaching to a Running Windows Forms Process

For Windows Forms projects, you can start your deployed application from its executable file before starting the debugger, and then attach to the running process from the debugger.

To attach to a process that is already running:

  1. In the Project painter, select Run > Attach to .NET Process.
  2. In the dialog box that opens, select the process you want to attach to.
    After you attach to the process, it starts running in the debugger and you can set breakpoints as you normally do.
Next

Select Run > Detach to detach from the process. This gives you more flexibility than simply using just-in-time (JIT) debugging.