I suggest you ...

Debug Lambda expressions

Allow Quick Watch and other Debug functions to work with Lambda expressions.

"Expression cannot contain lambda expressions" makes this powerful language feature second-class within the IDE.

Especially for data intensive applications being able to write Lambda expressions in the Quick Watch, Watch, Immediate Windows and debug evaluation is a must have.

2,778 votes
Vote 0 votes Vote Vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service

    You'll receive a confirmation email with a link to create a password (optional).

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Matthew RowanMatthew Rowan shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    under review

    18 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service

      You'll receive a confirmation email with a link to create a password (optional).

      Signed in as (Sign out)
      Submitting...
      • Michael PatersonMichael Paterson commented  ·   ·  Flag as inappropriate

        I don't care so much about E&C but would definitely love this feature. Totally disagree with @Ian Kemp though. The (sad) fact that this hasn't been implemented yet doesn't mean I won't upgrade to VS11.

      • Ian KempIan Kemp commented  ·   ·  Flag as inappropriate

        My company, and i'm sure many others, will not bother upgrading to VS11 if the ability to debug/quickwatch lambda expressions is not available. I don't particularly care how difficult this is to implement, what I do - and Microsoft should - care about is how much this feature is requested. Get it done and stop wasting everyone's time.

      • Lefteris KalamarasLefteris Kalamaras commented  ·   ·  Flag as inappropriate

        It's a great pain to start working with lambda expressions because of the increased flexibility and faster execution they offer, only to find out later that edit&continue is broken because of the appearance of a lambda expression elsewhere in our code. We had to completely remove lambdas because of this as our productivity decreased exponentially. As a Microsoft MVP, I can't stress enough the importance we place in edit&continue in our company's code development so I strongly suggest you get this functionality implemented.

      • GiedriusGiedrius commented  ·   ·  Flag as inappropriate

        Totally agree, that lambda debugging would be great. Until that, there's an workaround I use: there's dynamic linq library (link is here: http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx), so if you have it somewhere referenced, simply use it in debug, as it does not use lambdas.
        So simply write in quick watch window: System.Linq.Dynamic.DynamicQueryable.Where(source, "Id > 100");

      • kzukzu commented  ·   ·  Flag as inappropriate

        Indeed, edit&continue aren't paramount at all. Even the most simple Where or Select Linq expressions are a must-have in the watch, locals and immediate windows for inspecting app state while debugging.

      • Adam RalphAdam Ralph commented  ·   ·  Flag as inappropriate

        I don't care about edit and continue (I can't remember the last time I had a need for it) but I very much care about evaluation of lambdas in watch or immediate. This would be of enormous benefit for debugging. 3 votes from me.

      • Visual Studio UV Site AdminAdminVisual Studio UV Site Admin (Admin, Microsoft) commented  ·   ·  Flag as inappropriate

        Previously we had commented on lambdas and Edit & Continue, but there has also been a good amount of feedback around other debugging experiences as well. For example, there have been calls for better support of lambdas in the watch windows.
        Expression evaluation though the watch windows is a very broad area with some very challenging problems. The language teams and the debugger team are working together to figure out solutions to the problems we have in this area. As we continue our planning, we’d love to hear more feedback about the user experience you would expect.

      • codekaizencodekaizen commented  ·   ·  Flag as inappropriate

        I completely thought VS 11 would have introduced this feature... what a surprise when I was greeted with the same error!

      • MaxMax commented  ·   ·  Flag as inappropriate

        We definitly need the ability to edit and continue over lambdas and inser lambda into immediate window

      • jeffpiersonjeffpierson commented  ·   ·  Flag as inappropriate

        I agree with this request unfortunately I'm out of votes. Can some body add an extra vote for me? jk

      • Andrew TeebayAndrew Teebay commented  ·   ·  Flag as inappropriate

        I've come across this to. In fact I often have to re-write my LINQ queries into smaller chunks just so I can debug them and figure out waht went rong. A real shame as it realy takes away from the power of LINQ and Lambda

      • Pop CatalinPop Catalin commented  ·   ·  Flag as inappropriate

        Agree, This makes debugging either a "paing" when dealing wing Lambdas, or allot less powerfull when a simple lambda can be used to test some results.

      Knowledge Base and Helpdesk