I have written merge handler code for custom facet by seeing sitecore documentation. Searched a lot but did not find a way to debug code for MergingCalculatedFacetHandler . Is there any way to do that?
Debugging of xConnect is no different from debugging any other website hosted in IIS.
- Make sure that both dll with your changes and pdb files are copied to xConnect instance.
- In Visual Studio click Debug > Attach to Process and attach to w3wp.exe. See here for more info. You might consider using Visual Studio Extension that simplifies attaching to IIS processes.
- Add appropriate breakpoints to the merge handler in Visual Studio.
- Run xConnect code that is supposed to invoke the handler, e.g. submit a contact/interaction using xConnect client.