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.

8,885 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Matthew RowanMatthew Rowan shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    IamStalkerIamStalker shared a merged idea: PLEASE!!!! Add Lamda Expression debugging possibilty, please!!!  ·   · 
    SamSam shared a merged idea: Support lambdas in the immediate/watch window  ·   · 
    KoenKoen shared a merged idea: Allow use of lambda expressions in the watch, immediate, .. windows  ·   · 

    61 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • LambdaLambda commented  ·   ·  Flag as inappropriate

        Please provide support to run and inspect lambdas and "Implicitly Typed Arrays" in immediate window.

        Thanks.

      • Allon GuralnekAllon Guralnek commented  ·   ·  Flag as inappropriate

        @Anonymous: You can do this today by setting a breakpoint inside the lambda, thereby enabling you to inspect each value that comes in and out of the lambda. As far as I know, you can't set a breakpoint inside a lambda using the mouse, you must use the keyboard. Put the cursor inside the lambda body (e.g. on the first token, or anything after the => and the whitespace that follows) then press F9 (or whatever keyboard shortcut you use to place a breakpoint). Only the inside of the lambda statement will turn red, and the debugger will break there for each item the lambda is evaluated against (so for an array of 100 items, using .Where() will cause the breakpoint to hit 100 times).

      • Anonymous commented  ·   ·  Flag as inappropriate

        Does this include debug on Linq statements? If so it would get my votes.

        We should be able to step through each method in a linq method syntax statement, seeing what is returned by each .LinqMethod() call. Yes this would involve eager evaluation, the equivalent of calling ToArray() etc after each method, but there should be an option to make this so, rather than having to manually break a six method linq statement into 6 different statements for debug only, in order to get to the bottom of an issue, then having to reconstruct the original statement when you've identified the prob!

      • ShujaatShujaat commented  ·   ·  Flag as inappropriate

        Do I understand correctly that this idea is "under review" for more than 2 years?!

      • CoryCory commented  ·   ·  Flag as inappropriate

        This is not fake. I take it to be one of those the most important features.

      • Anonymous commented  ·   ·  Flag as inappropriate

        I for one vote for it, just because nobody comments doesn't mean it is fake. It means they have no extra info to add to it.

      • Jared ParsonsJared Parsons commented  ·   ·  Flag as inappropriate

        Roslyn is not a pre-requisite for this feature (although Roslyn's hostable nature likely makes this an easier problem to solve)

      ← Previous 1 3 4

      Feedback and Knowledge Base