Debugger not stopping at breakpoint when there's an exception within a LINQ lambda.

Here's a quick repro:

    new[]{0}.Select<int, int>(_ =>
        throw new NotImplementedException();
catch (Exception ex)
    throw; // breakpoint here

When the breakpoint is set, execution stops within the lambda causing some confusion.

In my particular case, the catch block of the intended breakpoint has some needed context for debugging and is making it unnecessarily difficult to track.


Sign In or Register to comment.