相关疑难解决方法(0)

错误设置断点,但仅在调试时在某些行上

这行导致PostEntityImages集合中的“找不到密钥” 。

Entity pimage = _context.PostEntityImages["postcreate"];
Run Code Online (Sandbox Code Playgroud)

当我把一个破发点上线,并把它放在监视窗口,它工作正常,并且关键存在。

更新:

protected override void ExecutePlugin()
{

try
{
    Entity pimage = null;
    if (_context.PostEntityImages.ContainsKey("postcreate"))
        pimage = _context.PostEntityImages["postcreate"];
}
catch (Exception)
{
    // Never hits this line
    throw;
}
} // When stepping in/over the line assigning pimage, execution will jump to this point, then be caught in the catch block of this methods caller.
Run Code Online (Sandbox Code Playgroud)

更新#2:

在调试模式下,可以设置一些断点。其他给出错误“无法设置以下断点:”

.net c# clr visual-studio-2010 dynamics-crm-2011

2
推荐指数
1
解决办法
4671
查看次数

标签 统计

.net ×1

c# ×1

clr ×1

dynamics-crm-2011 ×1

visual-studio-2010 ×1