1

I found several posts on how to debug Customer Sample Solution or the new plugin we created.

Could someone suggest me the step-by-step guide to debug the default (original) plugin in Sitecore Commerce, such as those from Sitecore.Commerce.Plugin.Pricing? For example: Plugin.Pricing.ResolvePriceCardsByBookBlock in IResolveActivePriceSnapshotByTagsPipeline

I am not sure if this can be achieved by using .NET Reflector. I have tested using "enable debugging" feature from VS Extension of .Net Reflector on Sitecore.Commerce.Plugin.Pricing assembly keeps causing the VS to restart when it reaches 61% of the process of enabling the debugging for that assembly.

The version of Sitecore Experience Commerce is 9 Initial Release.

The version of .NET reflector in VS 2017 Professional is .Net Reflector Pro 10.

  • What's the reason you want to debug their code? Is it to check your input data? – user1624411 May 4 '18 at 10:20
2

I don't have experience debugging them with reflector. However, I have been able to successfully debug them with dotpeek as a symbol server: https://www.jetbrains.com/help/decompiler/Using_product_as_a_Symbol_Server.html

However, don't expect to much, the code is optimized by the compiler and debugging it this way is quite hard to setup. In my experience you get quicker results by reasoning about the executing by analyzing the code and log files. Hope this helps.

  • Hi Jonne, thanks for your suggestion. How do you load the assembly of the Commerce Engine (e.g. Sitecore.Commerce.Plugin.Pricing)? What I have done: 1. I generated the pdb and run symbol server for Sitecore.Kernel (Sitecore XP) and Sitecore.Commerce.Plugin.Pricing (Commerce Engine) 2. My Visual Studio's Tools > Options > Debugging has pointed to the generated PDBs 3. Attached process to w3wp of Sitecore site, I could see several assemblies are loaded in Modules window 4. I stop debugging and I attached to w3wp of Commerce Engine, no assemblies of Commerce Engine loaded in Modules window – A_L May 4 '18 at 9:19
  • 2
    Don't attach to the w3wp process, but to the process of the engine self. Probably Sitecore.Commerce.Engine.exe? – Jonne Kats May 7 '18 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.