Power Community

Power Community

How to Debug a Dataverse Plugin without Installing the Profiler in the Plugin Registration Tool?

https://arunpotti.files.wordpress.com/2021/10/dataverse_1600x1600.png

Recently came across an awesome Tool to Debug a Plugin without Installing the Profiler or adding the Traces in the Plugin Registration Tool which was done by Nicolas Prats and this will really save our development efforts.

In this article, will explain his Tool in step-by-step process of plugin debugging.

Plugin Scenario: Get the Contact’s First name and Last name and convert the columns data to Upper case on Contact create.

Plugin Code screenshot is given below.

Registered the plugin in the Plugin Registration Tool.

Follow the below steps to start the Plugin Debugging process.

Step 1: Click on the link to navigate to Nicolas Prats GitHub.

Step 2: Scroll Down and Click on the latest release.

Step 3: Click on the latest release.

Step 4: Click on Dataverse.Browser.V0.0.0.2.zip.

File will be downloaded.

Step 5: Once the file is downloaded, go to the Downloads folder and locate the folder.

Step 6: Right click on the folder and Click on Extract All…

Step 7: Click on Extract.

File extraction is in progress and after the extraction, unzipped folder will be opened.

Step 8: Click on start.

Step 9: Click on More info.

Step 10: Click on Run anyway.

Step 11: Click on New …

Step 12: Provide the details as shown in the Environment Settings and Click on Go.

Choose a name for this environmentProvide a name for the environment
Environment hostnameProvide the instance url without https
Assembly PathPlugin’s Dll path in the Debug folder

Step 13: Dynamics 365 CE Authentication pop up will be opened.

Pick an account or Click on Use another account.

Step 14: Give your Email and Click on Next.

Step 15: Enter password and Click on Sign in.

Separate Browser window will be opened.

Note: Below browser window might take few Seconds to Minutes to Open.

Step 16: Provide the Email and Click on Next.

Step 17: Enter Password and click on Sign in.

Step 18: Click on Yes.

Step 19: Click on the required Model Driven App.

Step 20: Click on New to open a new contact to repro the plugin scenario.

Step 21: Click on Erase button to Clear the history of requests.

All Web API requests history is deleted.

Step 22: Enter the Mandatory fields in the Contact record and Click on Save.

Step 23: Got the Object reference error and Click on OK.

Step 24: On the Right-Hand side, you can see the Web API requests in Red color Icon. Expand it to see the Failed Plugin details.

Step 25: Click on the Web API request and Click on Debug button to Attach a debugger.

Step 26: You can see the list of all Available Debuggers. Select the Plugin Solution and Click on OK.

Step 27: Click on Continue.

Step 28: You can see the below message that the Debugger is attached. Click on OK.

Step 29: Put a Breakpoint in the Plugin Code.

Step 30: Try to Save the Contact record now to hit the breakpoint in the Visual Studio.

Debugger point will come to Visual Studio automatically.

Start Debugging and fix the code.

I got the error at line 44.

You can update the code, even the debugger is running and test it again without redeploying the Dll in the Plugin Registration Tool.

Test it thoroughly and update the Dll in the Plugin Registration Tool, once everything is working as expected.

Hope you have followed all the steps and tested the plugin code successfully.

Please like and share your valuable feedback on this article.

My earlier articles related to Dynamics 365 CE that you can have a look.

How to Enable the Licenses (Preview) feature for a Power Platform Environment?

How to Enable Maker Welcome Content (preview) in Power Apps Maker Portal?

How to Enable Managed Environments for a Dataverse Environment?

How to Enable the Modern Controls (Preview feature) in the Canvas Apps?

How to Enable 2023 Release Wave 1 updates in the Dataverse Environment?

How to Deploy Enterprise Applications in the new Dataverse Environment?

What is Preview, Experimental and Retired features in Canvas Apps?

How to Enable the New Power Fx Formula Bar in Power Apps Studio?

Writing Power Fx formulas with natural language

Power Fx Formula Columns in Dataverse

Generating Power Fx formulas from examples

How to Create Dynamics 365 Marketing 30 Days Trial Version Online?

How to disable Multi-Factor Authentication (MFA) on Dynamics 365 Login?

How to Create Microsoft Power Apps 30 days Online Trial Version and an Environment?

How to Update the URL of the Dynamics 365 CE Environment?

Power Apps US Government service URLs

How to Download Microsoft Power Platform Icons?

Microsoft Dataverse and Postman articles

Microsoft Dynamics 365 Online regions list

How to Install, Connect to Microsoft Dataverse and Use XrmToolBox?

How to take the Back-Up of Dynamics 365 Online environment?

How to restore Database Backup in Dynamics 365 Online?

How to recover a deleted Environment in Dynamics 365 CRM Online?

Advertisement

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Relationships in Dataverse managed with Power Automate

In Dataverse you can create relationships between tables, but how do you manage the relationships from a flow in...

More Articles Like This

- Advertisement -spot_img