To debug, just attach the debugger to the msmdsrv.exe process.
Do you use managed or native code to implement your plug-in? Also, are you using one of the samples or developing from scratch? If you provide more details, there could be some easier ways to catch errors