### When to Use the Process List Dialog

Note: The Process List dialog, menu choice, and pushbutton are only available on platforms that support process debugging (Windows NT).

If you close the debugger after attaching to a process on Windows NT, the process terminates.

You can use the Process List dialog to attach the debugger to an already running program where an error or failure has occurred. There are two main reasons for attaching the debugger to an already running process:

- You anticipate a problem at a particular point in your program, and you do not want to step through the program or set breakpoints. In this situation, you can run your program, and at a program pause shortly before the anticipated failure (for example, while the program is waiting for keyboard input), you attach to the process. You can then provide the input, and debug from that point on.
- You are developing or maintaining a program that hangs sporadically, and you want to find out why it is hanging. In this situation, you can attach the debugger to the hung process, and look for infinite loops or other problems that might be causing your program to hang.

On Windows NT, you can also use the Debug on Demand feature to invoke the debugger when an application running on your system throws an exception that is not handled.

On OS/2 (local debugging only), you can also use postmortem debugging to debug a dump file containing information on the state of an application when it trapped.

Debug on Demand
Postmortem Debugging on OS/2