Hi, Guys!
There is a lot of info how to debug plug-in, it works.
In regular case I can "start profiling" and than get the profile to debug.
But I don't have a step. I created a new Message for Dataverse and going to call it outside or use Perform Unbounde Action in PA.
How to debug plug-in without a step?
I need a way how to create Profile.
One more thing. You will have to allow steps for your CustomApi:
Ok. Screenshots revealed the mystery. You have to register the plugin step in "Post-Operation" mode to make it "debuggable". Check my article overall - https://butenko.pro/2022/01/03/debugging-custom-api-plugins-using-plugin-registration-tool/ and this screenshot in particular:
@Max77 Have you reviewed the known limitations of Custom APIs and suggested workarounds?
https://learn.microsoft.com/en-us/power-apps/developer/data-platform/custom-api#known-issues-with-custom-apis
1. I created Custom API according to this article https://learn.microsoft.com/ru-ru/power-apps/developer/data-platform/custom-api
Plug-in registration tool -> Register New Assembly
Plug-in registration tool -> Register New Custom API -> choose the assembly, plug-in->Add input/ouput parameters
2. It's the sample from the article https://learn.microsoft.com/ru-ru/power-apps/developer/data-platform/custom-api#write-a-plug-in-for-your-custom-api
Ligic is in the plugin (Code)
3. I have a separate accounting system and want to make Exchange mecanism using plug-in.
The sample works.
After registering the Plug-in I can see this screen
I didn't create the step. It appeared after a few tests and trying to debug in Visual Studio.
I tried to create the step manualy -> Step creation blocked.
then the registration form became Disabled
Start Profiling doesn't work as I typed.
It's a little challenging to help you without having the full picture. I have a few questions:
1. Do you use Actions (old crm 2013 feature that is still there) or Custom API (new feature that was introduced a few years back).
2. Where the logic that you try to troubleshoot resides - is it in the code of the plugin or in the body of the Action itself if you use Actions, not Custom API.
3. Any chance you can share screenshots on how you work with plugin registration tool - not only the screenshot of the profile registration that fails but something more - how the step is registered.
In other words - help us to help you. The more information is marrier.
@Max77 One option might be to try the 'Custom API Tester' plugin in the XrmToolBox, although it wouldn't be strictly debugging but might help you test it quickly using different parameters
Update
Step appeared after I installed Power Plafform Tools for Visusual Studio.
New issue. The Profiling doesn't start
Error message:
Invalid plug-in registration stage. Steps can only be modified in stages BeforeMainOperationOutsideTransaction, BeforeMainOperationInsideTransaction, AfterMainOperationInsideTransaction and AfterMainOperationOutsideTransaction.
So I can't profile and get Profile to debug.
OK, I can create a new step and bound it to the special entity. The Event will pass context.
@a33ik , is there a way to pass my parameters to debug?
Maybe in Unsecure Configuration Tab?
Hello,
Can you provide a few screenshots about your action and what specifically do you want to troubleshoot? Where is the logic of your action is located because there are few spots.
I'm not a developer, so not sure if you can Profile not, but the message for the action will be the logical schema name of the Action (e.g. rather than Create etc the name of the Action is the message - it would be something like new_mycustomaction). If you can't profile, the fall back would be add tracelog statements into your code and then view the turn on the Trace Log in dataverse and look at the entries that are written.
ankit_singhal
2
Super User 2025 Season 1
SadFox
2
CU06052020-0
2