这行导致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:
在调试模式下,可以设置一些断点。其他给出错误“无法设置以下断点:”