Compartir a través de


Debugging a Custom Plug-in

You can debug a custom plug-in by attaching to the processes associated with a running Windows Media server. You can use the Wmserver.exe process for most of your debugging, but if you want to trace through the interaction between Microsoft Management Console (MMC) and your plug-in, you must attach to the Mmc.exe process. To attach to these processes, perform the following steps:

  1. Start Windows Media Services.

  2. In your Visual Studio .NET plug-in project, on the Tools menu, click Debug Processes. If you are debugging a plug-in written by using a .NET language, you must also click Common Language Runtime before clicking OK.

  3. Select the Mmc.exe process associated with Windows Media Services.

  4. In the Attach to Process dialog box, click Native and click OK.

  5. Select the WMServer.exe process in the Processes dialog box.

  6. Click Native and click OK again. If you are debugging a plug-in written by using a .NET language, you must also click Common Language Runtime before clicking OK.

  7. Click Close in the Processes dialog box.

  8. Set your breakpoints and run your plug-in. For example, to trace into your plug-in's implementation of the EnablePlugin method on the IWMSBasicPlugin interface, set a breakpoint in the method and attempt to enable the plug-in by using the MMC.

See Also

Concepts

Custom Plug-in Basics