Reputation: 3921
Newbie here. I don’t know how it happened but I am working on a program and when I went to debug and step into, the yellow arrow went to the very end of my code and skipped the whole block. Is there a quick fix for this?
Upvotes: 3
Views: 1733
Reputation: 10699
Sometimes when you debug loops, iterations or lambda functions and delegates, the "yellow arrow" jumps for one step to the end of the scope block. You can keep hitting F11 more consecutive times, until it jumps back to the beginning statement (iteration criteria, delegate signature, lambda expression), and finally goes into the inner block.
What often also happens (as I mention lambda functions and delegates), that in case of invocation of those such layers of calls happen on the call stack which are part of the .NET system, and unless you configure Visual Studio carefully, you won't be able to debug into those. In that case place a breakpoint into the lambda function/delegate's body and press F5, and you should hit the breakpoint. But in such case the system warns you with a message, that it cannot display source code, you can see only assembly.
Also take a look at your Debugger settings: link
Upvotes: 1