4

In VS2010 and VS2012 I can step into lambda expression when current statement is displayed for the in part of the foreach loop:

StepInto lambda expression

I just had to press f11:

StepInto lambda expression VS2010

In VS2013 this is broken. When I hit f11, current statement goes directly to loop variable:

StepInto lambda expression VS2013

I can still get into lambda expression by putting breakpoint for i % 2 == 0 expression, but simple f11 is so much easier... Is this a bug in VS2013 or do I miss some setting or something?

Przemaas
  • 841
  • 11
  • 23
  • I just tried this, and it's working OK for me (I put the breakpoint on `in` and when I press `F11` it goes to `i%2 == 0`) – Matthew Watson Oct 14 '13 at 12:27
  • So it looks like it is my environment. Always better than broken VS... Do you know any setting which can drive such behavior, by the chance? – Przemaas Oct 14 '13 at 12:30
  • I can't think of anything. I even checked with Code Contracts enabled and with a Code Contract in the same method (because I had problems with those in the past) but it's all ok. I don't think it would be anything to do with the "Just My Code" setting, but maybe worth checking that? – Matthew Watson Oct 14 '13 at 12:31
  • 1
    Who marked this as "off-topic"? Perhaps whoever it was should [read the FAQ](http://stackoverflow.com/help/on-topic) which specifically states that you can ask about `software tools commonly used by programmers` - such as, for example, Visual Studio... – Matthew Watson Oct 14 '13 at 12:34
  • 1
    "Just My Code" did the trick. Thanks Matthew for the tip. If you post your comment again as an answer, I will gladly accept it – Przemaas Oct 14 '13 at 12:47

1 Answers1

4

Make sure you have the "Just My Code" debugging option turned on.

Go to Options -> Debugging -> General and ensure that "Enable just my code" is unselected.

Matthew Watson
  • 104,400
  • 10
  • 158
  • 276
  • 1
    Sorry to be sticking my oar in months after this was first answered (and for being a pedantic Pat!) but I had the same problem and thank you Matthew for the answer but should it not state that "Enable just my code" is **unselected**? – Tomás Aug 22 '14 at 15:42
  • @Tomás Hah, yes - I guess the OP realised what I meant. I'll update for future reader. :) – Matthew Watson Aug 25 '14 at 07:35