Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to debug crm online plugin?

Posted on by Microsoft Employee

I have dynamic crm online setup where I have a workflow attached with a plugin. It works when new account is created. But I am not getting appropriate result, so I need to debug the plugin code. I have open the code in vs2015 and Plugin Registration Tool. I don't want to use Profile to debug it because I can't see Profile Start button when installed the profile. Has any alternative way to debug my plugin's code?

*This post is locked for comments

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: How to debug crm online plugin?

    Check if you followed the correct steps for debugging.

    ssharmacrm.wordpress.com/.../how-to-debug-a-custom-workflow-activity-in-dynamics-crm

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to debug crm online plugin?

    I am trying to debug workflow activity and getting following errors when creating new account under that profiled workflows:

    Unhandled Exception: System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:

    'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "DirectCast(CustomActivityStep1: Calculate Geocode_1_converted, System.String)".

    Syntax error in cast operator; two arguments separated by comma are required.

    'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "CustomActivityStep1: Calculate Geocode_1_converted".

    End of expression expected.

    'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "CustomActivityStep1: Calculate Geocode_1".

    End of expression expected.

    'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "CustomActivityStep1: Calculate Geocode_1".

    End of expression expected.

      at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)

      at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)

      at System.Activities.WorkflowApplication.EnsureInitialized()

      at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)

      at System.Activities.WorkflowApplication.InternalRun(TimeSpan timeout, Boolean isUserRun)

      at System.Activities.WorkflowApplication.Run()

      at Microsoft.Crm.Workflow.ActivityHost.StartWorkflowExecution(Activity workflow, ICommonWorkflowContext context)

      at Microsoft.Crm.Workflow.ActivityHostBase.StartWorkflow(ICommonWorkflowContext context, Activity preLoadedActivity)

  • Verified answer
    Prashant_ Profile Picture
    Prashant_ 1,040 on at
    RE: How to debug crm online plugin?

    Hi Shahriat Hossain,

    Start Profiling option is available for plugin step not for assembly  or plugin .If there is step not visible then you have to register new step to plugin on message like create,update etc.If you want to debug custom activity(workflow) then you need to perform different steps. use following blog that will help you for workflow debugging.

    ssharmacrm.wordpress.com/.../how-to-debug-a-custom-workflow-activity-in-dynamics-crm

    dreamingincrm.com/.../debugging-custom-workflow-assemblies

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: How to debug crm online plugin?

    Do you want to debug workflow activity or plugin?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to debug crm online plugin?

    I have installed Profiler now now I need to select step to start the profiler but I can't see any step in my assembly plugin instead I can see a Workflow Activity when I select this activity I can't see start profiler tab on top of the registration tool. What should I do now?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to debug crm online plugin?

    dynamisity.wordpress.com/.../step-by-step-debug-plugin-in-dynamics-crm

    Refer this link for the same.

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,227 on at
    RE: How to debug crm online plugin?

    Hi Shahriat Hossain,

    Please do use tracing service inside your coding. It could be helpful for you.

    Refer following url's

    community.dynamics.com/.../implementing-tracing-in-your-crm-plug-ins

    www.powerobjects.com/.../debugging-your-plug-ins-with-the-plug-in-trace-log

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: How to debug crm online plugin?

    Hi,

    This is not the correct understanding. When you start profiling, the profiler will automatically give you the error log file which you need to upload while debugging. Please follow the shared blog/ video.

    It is straight forward and once you are able to make it work, you will love it :).

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to debug crm online plugin?

    I can see debugging using profiler needs to have exception or log file but I don't have any error. I only just want to debug the code while account create event occurred. What should be the workaround on it?

  • gdas Profile Picture
    gdas 50,085 on at
    RE: How to debug crm online plugin?

    Hi Shahriat,

    Try to reconnect plugin registration tool after profiler got installed , you should see the start profiling button. In addition you can try to download latest SDK and open plugin registration tool from there .

    dynamics365blocks.wordpress.com/.../how-to-debug-a-plugin-in-dynamics-365-online-using-plugin-profiler

    arunpotti.wordpress.com/.../how-to-debug-plug-ins-in-crm

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans