This topic shows you how to attach and detach the Microsoft Visual Studio debugger to the Forefront Identity Manager Synchronization Service (FIM Synchronization Service) process so you can debug your extension.

To attach the Visual Studio 2008 debugger to the FIM Synchronization Service process

  1. Ensure that the current version of the extension class library is copied to the Extensions folder under the FIM Synchronization Service installation folder.

  2. Open the extension project in Visual Studio 2008.

  3. Insert any required breakpoints.

  4. In Visual Studio, click Debug, and then click Attach to Process. The Attach to Process window appears.

  5. In the Available Processes window, ensure that the following options are set as follows:

    • Transport: Set to Default.

    • Qualifier: Set to the FIM Synchronization Service server name.

    • Show processes in all sessions: Select the check box.

  6. In the Available Processes list, click a process and click Select to choose the code type to attach to. The Select Code Type dialog box appears.

    • For rules extensions, click miiserver.exe. The extension must be configured to run in-process.

    • For connected data source extensions, click miiserver.exe if running in-process or dllhost.exe if running out-of-process.

  7. In the Select Code Type dialog box, click the Debug these code types option. Select the Managed check box and clear all other check boxes. This step is important because it affects what happens when the debugger is stopped or detached. If Native is selected, you must terminate the FIM Synchronization Service process to stop the debugging process.

  8. In the Attach to Process dialog box, click Attach to attach the debugger to the selected process.

Detaching the Debugger

When debugging is complete, you can detach the debugger from the process by clicking Debug, and then clicking Stop Debugging in Visual Studio.

See Also