The tite says it...
Really love LINQ, it produces a really clean and nice code.
But it can't be used when debugging is so bad.
So gotta convert it all to loops to be able to debug.
Please, please fix this.
_This issue has been moved from https://developercommunity.visualstudio.com/content/problem/433733/linq-debugging-is-total-crap.html
VSTS ticketId: 776232_
_These are the original issue comments:_
(no comments)
_These are the original issue solutions:_
(no solutions)
Sad to hear you don't like to debug LINQ, many have issues with it.
I'd suggest to use an extension method like this one, makes it easier to debug somewhat.
Another suggestion is to use breakpoints set to print to Output rather than break execution, this has helped me a lot.
public static class IEnumerableExtensions
{
public static IEnumerable<T> Pipe<T>(this IEnumerable<T> src, Action<T> action)
{
foreach (T item in src)
{
action(item);
yield return item;
}
}
}
cc @tmat
It seems to me that LINQ debugging works quite well now. Here's a quick recording showing that using some example of LINQ on VS 2019 version 16.7:

Most helpful comment
Sad to hear you don't like to debug LINQ, many have issues with it.
I'd suggest to use an extension method like this one, makes it easier to debug somewhat.
Another suggestion is to use breakpoints set to print to Output rather than break execution, this has helped me a lot.