OK, so you wrote your Tridion Event System. Now it's time to debug it. I know this is a hypothetical situtation -- your code never needs any kind of debugging ;) but indulge me...
Recently, Alvin Reyes (@nivlong) blogged about being difficult to know how exactly to debug a Tridion Event System. More exactly, the question was "What process do I attach to for debugging even system code?". Unfortunately, there is no simple or generic answer for it.
Different events are fired by different Tridion CM modules. These modules run as different programs (or services) or run inside other programs (e.g. IIS). This means that you will need to monitor (or debug) different processes, based on which events your code handles.
So the usual suspects are:
Recently, Alvin Reyes (@nivlong) blogged about being difficult to know how exactly to debug a Tridion Event System. More exactly, the question was "What process do I attach to for debugging even system code?". Unfortunately, there is no simple or generic answer for it.
Different events are fired by different Tridion CM modules. These modules run as different programs (or services) or run inside other programs (e.g. IIS). This means that you will need to monitor (or debug) different processes, based on which events your code handles.
So the usual suspects are:
- dllhost.exe (or dllhost3g.exe) - running as the MTSUser is the SDL Tridion Content Manager COM+ application and it fires events on generic TOM objects (e.g. events based on Tridion.ContentManager.Extensibility.Events.CrudEventArgs);
- TcmServiceHost.exe - fires the event that occurs when a Publish Transaction is created;
- TcmPublisher.exe - fires publishing events based on Tridion.ContentManager.Extensibility.Events.PublishingEventArgs;
- cm_wf_svc.exe - fires workflow events based on Tridion.ContentManager.Extensibility.Events.WorkflowEventArgs;
- w3wp.exe - IIS process (not sure is used by Event System);
Tip: if you are not sure which process runs your event system DLL, have a look at the processes that 'use' the DLL (e.g. by using Process Explorer's "Find Handle or DLL..." functionality) and debug those.
Comments
http://www.dominic.cronin.nl/weblog/debugging-64-bit-tridion-content-delivery-on-iis-7.5-1/blogentry_view#1357182811077846
I have implemented the Workflow using core-service in Tridion 2011. and i was able to debug the code by attaching the process "cm_wf_svc.exe". recently the Tridion version is being upgraded to 2013 and the Workflow is working fine, but now if i am trying to debug the code by attaching the process "TcmWorkflowAgent.exe", the execution is not stopping at the breakpoint and i am not able to Debug the code. can you please help me on this