2

I've used JeffDarchuk's EPExpressTab in an exercise to show some custom data. I've used the quick & dirty part.

It worked to certain extent, since I ported the code to my solution. I have my custom tab, but the other tabs vanished.

Is there a way to debug the Initialize pipeline which is defined in the processor type ?

<processor type="EPExpressTab.Pipelines.Initialize.Initialize, EPExpressTab" ></processor>
7

Yes, you can debug processors in the <initialize> pipeline the same as any other pipeline in Sitecore: set your breakpoints and attach to the w3p process from Visual Studio.

The issue is that the <initialize> pipeline only runs once when the application starts up, but normally you are attaching to debug the process after that code has already run.

The trick to debug the initialize processors is to:

  1. Set your breakpoints in Visual Studio
  2. Attach to the w3p process to debug the code as normal
  3. Make a small edit to the deployed web.config file in the deployed inetpub folder. You can just add a space and save the file, or recycle the Recycle the Application Pool for your website instance in IIS
  4. Make a request to website whilst the debugger is still attached in Visual Studio

This should cause the initialization code to fire again and the processors to run, allowing you to debug and hit your breakpoints.

| improve this answer | |
1

Yes it is possible to debug processors even if they are Sitecore out-of-the-box ones. Here two articles(link 1, link 2) with step-by-step actions you can take to achieve that. But in a nutshell, if you are using DotPeaks you can:

a) start a SymbolServer and select which assemblies you want to load. This will create pdbs of those assemblies for you so you can attach the debugger to then

b) Update Visual Studio in Tools - Options - Debugging - Symbols and add the Symbol server that DotPeak creates for you. By default it´s "localhost:33417"

c) Still in the Dubbuging section - General, uncheck "Enable Just My Code"

d) At this point you are pretty much set. If you open the processor using Assembly Explorer and putting a breakpoint in it, you should be able to see it.

Hope this helps

| improve this answer | |
  • I would like to see more detail in this answer. I realize you're helping by providing some links, but that does equate to more of a link only answer. Perhaps synthesize some of the content from those links into part of the answer and help to build more of a step by step? – Pete Navarra Dec 6 '18 at 17:38
  • updated answer with more info – Diego Dec 6 '18 at 17:57
1

I just started using the pipeline.debug Sitecore module, which allows you to see the output properties of any processor args without needing to debug, set breakpoints, or patch in any custom patch configs by doing the following:

  1. insert a "debug processor" directly after any other processor inside of a pipeline
  2. check off the properties from the processor you want to output, or write your own "watch" style property directly. If checked properties are collection types, they will be enumerated with their properties.
  3. Do whatever action is required to kick off your pipeline - in your case, recycle the app pool or update a config
  4. Go to the memory output tab and refresh - where you will see an output window of all the selected properties for all added debug processors.
| improve this answer | |

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.