怎样Debug Dynamics 365 CRM Plugin

写了这么多期的随笔,很多人会问,怎么debug写好的plugin呢

首先我们需要准备以下内容

Visual Studio

Plugin Registration Tool

CRM Instance

Error Log

首先,我们要打开Plugin Registration Tool

然后我们需要Install Profiler

install成功之后, 我们下一步要讲plugin的step  start profiling

我们选择exception之后点击确定

成功之后的step会显示如下

现在,我们要去CRM中再重新重现一下状况.

当我们重新创建之后,取而代之的是Business Process  Error.

下载这个log file

接下来,我们打开VS项目,并且点击Debug -> Attach to Process

点击Attach

当我们再次打开Plugin Registration Tool的时候可以看到上面有debug的界面, 就说明Tool已经被attach了.

首先 我们要把需要Stop Profiling

点击Ribbon上的 Debug按钮.

Profile是事先需要准备好的error log

Assembly是build生成好的dll文件.

Plugin选择需要debug的部件.

点击Start  Execution之后我们就可以看到VS当中的debug point已经triggerred.

原文地址:https://www.cnblogs.com/TheMiao/p/10703927.html

时间: 2024-08-01 08:36:36

怎样Debug Dynamics 365 CRM Plugin的相关文章

创建一个dynamics 365 CRM online plugin (十) - Isolation mode or trust mode

Isolation Mode 也被称作为Plugin Trust CRM里面有两种plugin trust / isolation mode 1. Full Trust 只在OP系统中可使用,没有限制 plugin 挂掉之后会影响到CRM服务器运行. 可以访问服务器文件 2. Partial Trust or Sandbox 可在OP系统和online系统中使用 运行在特定的区域中,当plugin crash之后, CRM系统不会随之崩盘 Plugin 在secure layer底下运行, 并且

创建一个dynamics 365 CRM online plugin (五) - Images in Plugin

Snapshots of the primary entity's attributes from database before(pre) and after (post) the core platform operation. 怎么理解这句话呢 简单的我们可以理解PreOperation与PostOperation的 entity中数据的镜像. 使用Pre-Entity镜像的一些案例: 1. 如果你需要对original data在modification之前做使用. 2. 如果你需要fo

创建一个dynamics 365 CRM online plugin (八) - 使用Shared Variables 在plugins 之前传递data

CRM 可以实现plugin之前的值传递. 我们可以使用SharedVariables 把值在plugin之间传递 实现plugins之间的传递非常简单,我们只需要用key value pair来配对传递. 读取的时候用key来获取相应key的value try { /* * SharedVariabls can share the variabls to different plugins * SharedVariabls will only work under same pipeline

创建一个dynamics 365 CRM online plugin (七) - plugin当中的Impersonation角色

我们之前创建的plugin都是使用default的 run in User's Context. 理解就是使用正在登陆的security context用户信息 那有个问题,如果当前用户的security role没有相应的权限访问功能,我们就要安排一个新的用户 e.g. admin来记录信息而非当前用户. 让我们在registration tool更新TaskCreate class之后再CRM中打开新建Contacts. 我们可以打开activities发现follow up 里用户更改为在

创建一个dynamics 365 CRM online plugin (十二) - Asynchronous Plugins

这篇是plugin的终结. 通过之前的11期我们应该发现了plugin其实学习起来不难. async plugin 是把plugin的功能async run起来. e.g.  我们之前做过的preOperation的plugin会马上执行并且马上有数据显示在entity中. 但是async plugin会在async 形式下run, 使用场景是有很大的计算量或者处理量会导致CRM server进程被block 掉. 我们可以在plugin registeration tool中选择是否需要asy

怎样创建一个dynamics 365 CRM online plugin (二)

Golden Rules 1. Platform only passes Entity attributes to Plugin that has change of data. 2. If the user does not enter any value into attribute, the attribute is not avaible in AttributeCollection of Entity. 3. Always check if attribute is present i

创建一个dynamics 365 CRM online plugin (四) (Not finished)

开始之前,我们要确认一下 Plugin 的 pipeline. PreValidation -> PreOperation -> Server Side System Main Event-> PostOperation PreValidation 是在security check 之前, 通常会用来加载外部数据和用户不相关的内容.PreOperation 是在security check 之后, 通常会用来做一系列的功能.PostOperation 是在System Main Even

Dynamics 365 CRM Connected Field Service 自动发送command

上期降到了怎样部署connected field service(CFS) 我们假设现在IoT 设备是温度监控器, 当温度触发我们之前预设的温度值, IoT会通过IoT Hub 发送IoT Alert到CFS中. 第一次触发, 系统会自动发送reboot的command. 为了有更好的用户体验, 我们需要自动发送command. 自动发送非常简单. 首先,我们需要创建一个workflow 我们的workflow需要在IoT Alert创建的时候触发. 这个workflow需要有以下两步: 1.

Dynamics 365/CRM 保存之后触发onchange

有时候一些开发人员可能会遇到这样的问题而不知道其原因: 在一个字段注册了onchange事件之后,保存表单,发现onchange 又再次触发了一遍. 或者,在Ribbon 中使用 Xrm.Page.data.save(saveOptions).then(successCallback, errorCallback) 在successCallback,errorCallback中均没有调用字段的fireOnchange,然而字段的onchange又被触发了. 原因是CRM 在刷新页面数据时,会比较