Finding the process ID

Each process running in Microsoft Windows is assigned a unique decimal number called the process ID (PID). This number is used to specify the process when attaching a debugger to it.

You can determine the PID for a given app using Task Manager, the tasklist command, the TList utility, or the debugger.

Task Manager

Task Manager can be opened in a number of ways, but the simplest is to select Ctrl+Alt+Delete, and then select Task Manager.

On the Processes tab, select Details to see the PID, along with other useful info.

Some kernel errors may cause delays in Task Manager's graphical interface.

The tasklist command

Use the tasklist command from a command prompt to display all processes, their PIDs, and a variety of other details.

TList utility

Task List Viewer (TList), or tlist.exe, is a command-line utility that displays the list of tasks, or user-mode processes, currently running on the local computer. TList is included in the Debugging Tools for Windows package.

When you run TList from the command prompt, it will display a list of all the user-mode processes in memory with a unique PID number. For each process, it shows the PID, process name, and, if the process has a window, the title of that window.

For more information, see TList.

The .tlist debugger command

If there's already a user-mode debugger running on the system in question, the .tlist (List Process IDs) command will display a list of all PIDs on that system.

CSRSS and user-mode drivers

To debug a user-mode driver running on another computer, debug the Client Server Run-Time Subsystem (CSRSS) process. For more information, see Debugging CSRSS.