3 ms·
Syntactically LINQ is a breath of fresh air, but it's totally the opposite when it comes to debugging. Right now the experience of debugging a nested loop (whic
by smhinsey 15y ago
Syntactically LINQ is a breath of fresh air, but it's totally the opposite when it comes to debugging. Right now the experience of debugging a nested loop (which typically could be converted to some form of LINQ) is way better than if you look at the equivalent LINQ.
It's totally possible I am missing some magical IDE feature, but if you want to do something like take a look at the 4th item in some intermediary part of a LINQ query, you're out of luck unless you can either break it up into smaller units of syntax or convert it to a loop.
- politician 15y agoPut your cursor on the part of the expression that you want to debug and press F9 to set a breakpoint. Setting breakpoints by clicking in the gutter doesn't work for LINQ like you might expect - you have to use the hotkey. I frequently hear complaints about debugging LINQ, but Visual Studio supports it well enough. Microsoft could have done a better job informing people about it.
- smhinsey 15y agoWow, that is probably going to help a lot, thanks. I've been using VS since the 90s and I still feel like I don't know half of what it can do. I'm not sure how to fix this, but I am pretty sure the increasing tendency to release documentation as videos is not the answer.