BUG: "Attach to Process" List Is Empty

ID: Q235434


The information in this article applies to:


SYMPTOMS

In the debugger, the "Attach to process" list is empty.


CAUSE

The "Attach to process" list is populated using a performance counter API. Depending on the environment and the installed performance counter DLLs, the code to populate the list may fail.

This bug only affects the "Attach to process" list when running on Windows NT and Windows 2000.


RESOLUTION

Resolution 1

You should be able to attach to the process using Task Manager:
  1. Enable just-in-time debugging (JIT):

    1. In Visual C++, on the Tools menu, click Options.


    2. On the Debug tab, make sure that Just-in-time debugging is selected.




  2. Run Task Manager and select the process to attach to. Right-click and select Debug.



Resolution 2

Disabling performance counters, as described below, may also resolve the problem.

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

To allow the "Attach to process" list to be filled, you may need to temporarily prevent the loading of all performance counter DLLs. Although these extensions are services, you cannot control the loading of them through the Services utility in Control Panel. You can identify performance counters by searching the services for a subkey named "Performance" in the system registry:

  1. Start a registry editor such as RegEdt32.exe.


  2. Select the following registry key:


  3. 
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services 
  4. Search for a key named "Performance."

    To do this in RegEdit: From the Edit menu, click Find and make sure only Keys is selected.

    To do this in RegEdt32: From the View menu, click Find Key.


  5. Edit the Library value to change the name of the DLL to an invalid name. Rename it in such a way that you can rename it back to the original name after you finish debugging.


  6. To do this in RegEdit or RegEdt32: Double-click the word Library. Place an X in front of the name of the DLL.

  7. Repeat steps 3 and 4 until you have searched through all of the services.


  8. Restart Windows.


  9. Start Visual C++ and try to use "Attach to Process."


  10. Once you have finished debugging, reverse steps 1-5 to rename the performance counter library names to their original values.



STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

If the steps for Resolution 2 do not help, and if Resolution 1 is unsatisfactory, check the version of the operating system. Even though this bug is known to occur on Windows NT 4.0 as well Windows 2000 beta, Resolution 2 may not work on Windows 2000 beta. You may need to go back to a released version of Windows NT.

Additional query words:


Keywords          : kbDebug kbide kbVC600bug kbDSupport kbGrpVCCompiler 
Version           : winnt:6.0
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: June 30, 1999