Esta pagina se ve mejor con JavaScript habilitado

Debugging lambda expressions in Visual Studio 2015

 ·  ☕ 1 minutos lectura  ·  ✍️ Saturnino Pimentel

One of the feature that we needed in Visual Studio and that I personally expected for some time is the ability to debug lambda expressions, well with the release of Visual Studio 2015 we have the pleasant surprise that this feature has been aggregate and make use of it is easy.

Consider the following example in which we will create a collection of integers ranging from 1 - 100.

 var numeros= Enumerable.Range(1, 100);

Then we’ll add the field to Watch panel with a right click and selecting Add Watch option (probably you already know this).

With this, we will have our field and know what it contains, then edit the content and the intellisense help us to select any of our extension methods.

For this example, we’ll show all the numbers that pair leaving our lambda expression as I show below.

And ready we can see the result of our lambda expression.

This will help us make our life easier!

compartir en

Saturnino Pimentel
Escrito por
Saturnino Pimentel
Software developer