Typically we use F11 and F10 for debugging in visual studio, but when the code section is within curly braces {
we may not be able to debug inside lines (refer the attached screen shot lines 36, 37, 38).
How do we debug those sub lines during debugging ?
CodePudding user response:
As mentioned by Phuzi in a comment. You are pointing to a lambda statement block. This is used to specify some piece of code to be called later from some other code. The common name for this is delegate, and functions somewhat similar to the native concept of 'function pointer'.
So when you step thru the code there will only be a single method call that is stepped over in one step. You can add a breakpoint to one of the lines in this lambda statement, and the debugger will break when this line is called. This might happen when you step over the function call, but it might also happen at some later time, or not at all. It all depends on the implementation of AddAuthentication
.