Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

Posted on by 307

HI all,

If you suffer from complexity and slowness and of debugging process for your plugins and code activities, please check my Nuget/Github project and package.

 It helps you to debug your Plugin/CodeActivity directly from start of execute method (and also constructor of your classes). No need to do  deploy, profile, attach to process, replay execution….

Should be easy to use. Check samples in TestApp (program.cs) project. After that just put breakpoint, click F5 and debug as any desktop application.

 

With this you can implement automated tests of your plugins and code activities. I didn't find that somebody published such library so I hope it will help you. Published version is tested with .net framework 4.5.2, 4.61 and CRM SDK 8.0 and 9.0.

*This post is locked for comments

  • Nikica Profile Picture
    Nikica 307 on at
    RE: Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

    New version published to Nuget and Github 1.1.0. Better debugging experience.

  • Nikica Profile Picture
    Nikica 307 on at
    RE: Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

    Guys, thx for your comments. I'd appreciate some feedback. Do you find it usable? Can something be improved?

  • denis birkle Profile Picture
    denis birkle 30 on at
    RE: Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

    thanks, that helped! I am able to execute the plug-in now. Still get an error, though. (Unable to retrieve primary entity for message Update in stage 0: System.NullReferenceException: Object reference not set to an instance of an object).

    I guess I'm missing some properties to be able to get the entity..

    Well, going to look into it :)

  • Verified answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

    Thanks for sharing

  • Nikica Profile Picture
    Nikica 307 on at
    RE: Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

    Hi Denis. You need to reference project with you plugins in your testApp and test code as github sampes. Can you give more description about what are you doing and which issue you have?

    You need to set TestApp as startup project. Create your test function that calls your plugin/codeActivity. Set input parameters and context entity and attributes according to your need. Call this function from somewhere,. Press F5. I'll support you if you need.

  • denis birkle Profile Picture
    denis birkle 30 on at
    RE: Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

    Since I am new to CRM Development, are there more detailed instructions on how to get this working? I imported the TestApp project into my solution, but how do I proceed? Do I have to replicate the code parts I have to test?

    Thanks!

  • Nikica Profile Picture
    Nikica 307 on at
    RE: Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

    Thx Arun . No mure such posts. I apologize.

  • Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

    Hi, thanks for sharing this to community.

    The content is good for a blog post, but you posted in forum which is meant for problems related to Dynamics products & receiving solution/workaround for the same from other community members.

    You should see how to request a blog: community.dynamics.com/.../136.request-a-new-blog-or-blog-to-syndicate

  • Nikica Profile Picture
    Nikica 307 on at
    RE: Debug plugins and codeActivities as desktop application(no deploy) - DynamicsCrm.AssemblyDebugger

    The usage is:

    1) add DynamicsCrm.AssemblyDebugger project/nuget to your project

    2) implement sample with some of your CodeActivities/PLugins (Program.cs->SamplePluginExecute, SampleCodeActivityExecute)

    3)put breakpoint in your CodeActivity/Plugin

    3) press F5

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans