Visual Studio 2015 brings us several long-requested improvements to the debugging process, not the least of which is support for evaluation of lambda expressions. We can finally be rid of the “Expression cannot contain lambda expressions” message that has frustrated many a developer deep in the midst of a debugging session.
There are 3 ways we can now evaluate lambda expressions while debugging: in the watch window, in the immediate window, and directly in a debugger window. Each of them gives us similar options and flexibility, such as error reporting, expansion and enumeration of results, and saving our expressions for future debugging sessions. The best way to see how this works is to view it in action in Visual Studio 2015:
Take a look and then try it out yourself, and enjoy debugging those lambda expressions!
Latest posts by Rachel Hagerman (see all)
- Entity Framework with Google Cloud SQL - February 2, 2017
- Cloud Storage Options Part 2 - February 1, 2017
- Cloud Storage Options Part 1 - January 31, 2017
- SQL Server in the Google Cloud - January 30, 2017
- Breakpoints in Auto-Properties in Visual Studio 2015 - December 30, 2016