Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to step through lambda expression

I have this little method

    [System.Diagnostics.DebuggerStepThrough]
    public static void Log(Database db)
    { 
        db.Log = s => MyLogger.Log(s);
    }

but the debugger still stop for every s => MyLogger.Log(s)

is there a way to tell the debugger to ignore this specific line?

king of boring to have to manually step to/over/out of it for each query

this db.Log thing is the entity framework 6 log

like image 451
Fredou Avatar asked Oct 26 '25 10:10

Fredou


1 Answers

this does what i want;

    [System.Diagnostics.DebuggerStepThrough]
    public static void Log(Database db)
    {
        Action<string> Log = MyLogger.Log;
        db.Log = Log;
    }
like image 131
Fredou Avatar answered Oct 29 '25 01:10

Fredou



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!