我做了一個非常簡單的方面,並在調試時發現問題(請參閱代碼)。我在方法出口設置了一個斷點,實際上它在「入口」方法內。 PostSharp 1.5,Visual Studio 2008 SP1
這是一個已知的錯誤,是否有任何解決方法?PostSharp和調試問題?
class Program
{
[MyAspect]
static void Main(string[] args)
{
Console.WriteLine("body");
} // setting breakpoint here
}
[Serializable]
class MyAspect : OnMethodBoundaryAspect
{
public override void OnEntry(MethodExecutionEventArgs eventArgs)
{ // hits here actually! (debug mode)
Console.WriteLine("entry"); // hits here actually! (release mode)
}
public override void OnExit(MethodExecutionEventArgs eventArgs)
{
Console.WriteLine("exit");
}
}
重建/清理不會更改任何內容。 您是否嘗試過執行我的示例? – skevar7 2009-09-08 05:39:35
這似乎是一個.pdb問題。 PostSharp僅修改程序集,而不修改調試符號文件。 – boj 2010-09-27 14:33:43