web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to debug a plugin that is called from another plugin

(0) ShareShare
ReportReport
Posted on by 645

I have plugin A that calls an other plugin B, I get an error from plugin B and I can't debug it, when I use the plugin reg tool I can debug only plugin A, I tried to add to plugin B this code :
  throw new InvalidPluginExecutionException("hello");

but nothing happened... 
What is the best way to debug a plugin called from another plugin

*This post is locked for comments

I have the same question (0)
  • Shahbaaz Ansari Profile Picture
    6,211 on at

    Why don't you directly debug Plugin B, by passing static values from Plugin A

  • David Jennaway Profile Picture
    14,065 on at

    The only way to directly call one plugin from another is if the plugin classes are in the same assembly, and you explicitly call the Execute method of one plugin class from another. If you do this, then the code in plugin B would be running within the execution context of plugin A, so you could debug it.

    Is the above what you're doing ? If not, how are you calling plugin B ?

  • sahara Profile Picture
    645 on at

    Hey Shahbaz never heard about it , can you please tell me more

  • sahara Profile Picture
    645 on at

    Hey David the problem is not with calling the plugin but with debugging the plugin

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

    You can not debug two plugin at the same time , you have to look for some alternate way like to register other plugin in another stage and call separately , may be you used some hard coded value in your plugin.

    You may also add your plugin code in console application and provide hard coded value to check the main logic.

    Hope this helps.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans