Steps to Enable Script Debugging for Dynamics CRM Outlook Client in Visual Studio

By | July 20, 2016

We can debug the Script used in Outlook using Visual Studio. For this, we just need to change some settings in the “Advance setting” section of Internet Explorer.

In this blog, we will show how to enable Script Debugging using the Visual studio.

For this, we have developed the sample code. So, here we have added the ribbon button named as “View address” on the account entity. The button is used to open a pop-up box, which will show the address of current Parent Contact Selected on account. Please see the below screenshot.Debugging for CRM Outlook Client

So, this functionality works fine on the web browsers as you can see in the above screenshot. But when we tested it in CRM Outlook client, we got the blank window as shown below.CRM outlook client

So to find out the root cause, we need to debug the script in Outlook. In order to enable the debugging in Outlook, we can follow the below steps. Using these steps, we can debug the script used for Outlook in Visual studio.

Steps To Debug the Script in Visual Studio:

  1. Open the IE (Internet Explorer), go to Settings >> Internet optionssteps to debug script
  1. Go to Advance section and uncheck the “Disable Script Debugging” options and then click OK. Please see the below screenshot:Disable Script Debugging
  1. Then go to the Script and put the “debugger” in the function which you want to debug. Please see the below screenshot.debuger

                           In the above screenshot you can see, we want to debug the getBillToAddress() function. So, we have placed debugger in the               getBillToAddress function.

  1. Then go to Outlook, open Account record, and click on View Address button. You will get the Visual Studio Just-In-Time Debugger Prompt to select the debugging engines. Please see the below screenshot.Visual Studio Just-In-Time Debugger

If you click on Yes button, you will be able to debug your script in Visual Studio. Please see the below screenshot.

debug your script in Visual studio

In this way, you can easily enable debugging for CRM Outlook Client in Visual Studio.

Maps for personal use, why not for business? Know more at www.maplytics.com