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.
18 comments
-
Michael Paterson commented
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 Kemp
commented
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.
-
Dave Black
commented
I've had this request presented on the Connect website since July 2009. Isn't it about time?
https://connect.microsoft.com/VisualStudio/feedback/details/472999/ability-to-evaluate-lambda-expressions-in-immediate-window -
Lefteris Kalamaras
commented
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.
-
Giedrius
commented
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"); -
kzu commented
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 Ralph
commented
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.
-
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. -
codekaizen
commented
I completely thought VS 11 would have introduced this feature... what a surprise when I was greeted with the same error!
-
Santosh Arisetty
commented
Having this feature through immediate window will greatly help developer as the solutions can be built at decent pace.
-
Max
commented
We definitly need the ability to edit and continue over lambdas and inser lambda into immediate window
-
Roman Wagner
commented
To enable both things they must implement an expression parser to build an expression.
This parser could also usefull to enable inline lambdaexpression in WPF-Bindings
See http://archive.msdn.microsoft.com/LambdaConverter -
abatishchev commented
Roman, what the relation between Debug Lambda and E&C?
-
Roman Wagner
commented
Edit and Continue is what we need.
-
jeffpierson
commented
I agree with this request unfortunately I'm out of votes. Can some body add an extra vote for me? jk
-
Nikita Golovin
commented
It would be cool, that lambdas and LINQ won't ***** Edit and Continue possibilities
-
Andrew Teebay commented
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 Catalin
commented
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.