Forcing the Add-In to Call the Debugger

To force CRM to call the debugger, you must add a line similar to the following in your add-in source code where you want to call the debugger:

System.Diagnostics.Debugger.Launch();

Assuming you registered a plug-in with a step associated to the Account entity on the Create event (as our example did), when you go the CRM web application and try to create a new Account, you will see the dialog shown in Figure 23.38 after you click the Save or Save and Close buttons on the Account form.

Image

FIGURE 23.38 Visual Studio just-in-time debugger.

Click Yes to open a new instance of Microsoft ...

Get Microsoft Dynamics CRM 2013 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.