DEBUGGING A CUSTOM WORKFLOW ACTIVITY IN DYNAMICS 365 AND POWERAPPS
In the previous post, we created a new Custom Workflow Activity and used it in a workflow.
Let’s look at how to debug one of these.
Open the Plugin Registration Tool (PRT) and select Install Profiler:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bba299b309.png)
This may take a few minutes. Once installed, you will see the Plugin Profiler at the bottom of the list:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbb61ebac8.png)
Right-click it and select Start Profiling Workflow:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbb8b9c604.png)
Find your workflow in the list and click OK:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbbe9c239f.png)
Now perform the action that runs the workflow custom activity. I.e. in our case we have a workflow running on saving the account with the city field populated.
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbc7151149.png)
Once complete, expand Plug-in Profiler to find your profile and click Unregister:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbd070dbd3.png)
Now from the top, select Replay Plug-in Execution:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbd8f70251.png)
Select the
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbdada6e07.png)
Select the assembly of the custom workflow assembly project
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbdea0c153.png)
Now, jump over to your Visual Studio project for the custom workflow, select Debug then Attach to Process:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbe1feb1c0.png)
Find the PluginRegistrationTool and click Attach:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbe84970cf.png)
Add a breakpoint in the Execute method:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbeee11f68.png)
Back in the Plugin Registration Tool, click Start Execution:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbeb81a775.png)
The breakpoint is hit, and you can start debugging:
![](https://carldesouza.com/wp-content/uploads/2019/10/img_5d9bbf5b1d5a5.png)
No comments:
Post a Comment