locked
Finding an Endless Loop - How do I get tracing to work? RRS feed

  • Question

  • I need help, please, understanding tracing.  

    I have a series of plug-ins and workflows that trigger eachother in a sequential order.  In one specific case, some how an endless loop is created and a workflow gets called (and fails) 40+ times for what should be one instance.

    I've enabled tracing in the registry on the server, but no files get generated.  (added TraceEnabled:1, TraceRefresh:1, TraceDirectory: C:\Trace, and then ran iisreset).  I've tried remote debugging, but because the processes are asynchronous and in different visual studio projects, I can't get a full picture of what's happening.  I also have not been successful using the plugin registration tool's debugger, but again I'm not sure that it will help since there are multiple assemblies.  I do have tracing statements all over the place, but they are not written out into the errors in the system job log.

    Does anyone have any suggestions as to how to get some trace information on what is happening here?  Did I just not do something in turning tracing on, on the server?


    Thanks-

    Tuesday, October 9, 2012 2:47 PM

Answers

All replies

  • Hello,

    TraceDirectory key is ignored.

    [CRM Installation Folder]\Trace folder would be used. You should recheck it for logs.


    Freelance Developer for Dynamics CRM 4.0/2011

    • Marked as answer by lambrite Tuesday, October 9, 2012 2:59 PM
    Tuesday, October 9, 2012 2:58 PM
    Moderator
  • Thank you!  No idea why so many posts specifically about CRM tell you to specify the folder then...
    Tuesday, October 9, 2012 2:59 PM
  • to detect an infinite loop you need to check the depth of execution context in plugin

    moreover you need to check whether the condition you are checking in the plugin

    and you need to check for relationship

    please mark as answer if you find it suitable

    • Proposed as answer by Manu_Sharma Tuesday, October 9, 2012 4:05 PM
    Tuesday, October 9, 2012 4:04 PM