<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Debugging C# 3.0 Part II</title><link>http://blogs.msdn.com/sreekarc/archive/2007/11/29/debugging-for-c-3-0-part-2.aspx</link><description>Overview In the last article I covered the "results view" for lazy evaluated collections like Queries/Enumerable and the use of extension methods in the watch and immediate window. For completeness I will cover stepping, range variables, anonymous types</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Debugging C# 3.0 Part II</title><link>http://blogs.msdn.com/sreekarc/archive/2007/11/29/debugging-for-c-3-0-part-2.aspx#6605079</link><pubDate>Fri, 30 Nov 2007 03:15:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6605079</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
</description></item><item><title>re: Debugging C# 3.0 Part II</title><link>http://blogs.msdn.com/sreekarc/archive/2007/11/29/debugging-for-c-3-0-part-2.aspx#6630931</link><pubDate>Sat, 01 Dec 2007 17:11:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6630931</guid><dc:creator>Eamon Nerbonne</dc:creator><description>&lt;p&gt;It also unfortunately fails to fix the rather annoying limitation that expressions in immediate code and watches cannot contain lambda expressions; not even lambda expressions which don't reference any local variables but are entirely self-contained (and should certainly be generatable by the IDE).&lt;/p&gt;
&lt;p&gt;It seems that the IDE can't compile lambda's on the fly. &amp;nbsp;So, by extension, what's equally not possible is Edit and Continue in any scope which also contains a lambda expression, or an expression in the immediate window which contains a lambda.&lt;/p&gt;
&lt;p&gt;That's a big limitation; &amp;nbsp;Unlike procedural code which frequently must be excessively explicit about the minutiae of a data structure and thus in which case debugging is usually straightforward (if tedious), code relying on LINQ heavily can so easily filter and remap a list, that the exact nature of a list after a particular transformation is often never in a local variable and never easily inspectable. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Even obvious flaws can be hard to debug, requiring that you split out a long but readable query into a multitude of separate queries in a far less readable (and efficient) fashion, and if it's code that's badly understood and requires frequent debugging, you'd be tempted to leave the code in it's inefficient, unreadable form merely to make the necessary debugging sessions simpler.&lt;/p&gt;
&lt;p&gt;As is, I'm impressed by the debugger, but it's just not enough to really help debugging issues in LINQ code. &amp;nbsp;If a list is only ever accessed in some remapped form or other in code, a debugger must be able to show me that remapped form to be useful; even if it's not stored in a variable name in scope, and ideally, I'd be able to slightly modify the query debug-time to improve its utility.&lt;/p&gt;
</description></item><item><title>re: Debugging C# 3.0 Part II</title><link>http://blogs.msdn.com/sreekarc/archive/2007/11/29/debugging-for-c-3-0-part-2.aspx#6672450</link><pubDate>Thu, 06 Dec 2007 03:18:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6672450</guid><dc:creator>Sree_c</dc:creator><description>&lt;p&gt;I Agree with you Eamon, many of the functional constructs in the language create many intermediatary types that are not easy to debug or try out. More so if the user wishes to create Ad-Hoc queries or lambda expressions to disgnose a problem in his code, he can't do that with out restarting the debug session.&lt;/p&gt;
&lt;p&gt;Lambda expressions are a good eg of this, i would certainly like to fix this hole in the debugger and allow for lambda expression to be created with a copy symantics ( where the lambda expressions is only valid for the stack frame its created on) . &lt;/p&gt;
&lt;p&gt;There are a lot of ideas we have and some of them are being discussed in the team.&lt;/p&gt;
&lt;p&gt;I would be very interested in knowing from you specific instances of in your code where you felt that the debugging experience was lacking...&lt;/p&gt;
&lt;p&gt;thanks Sree&lt;/p&gt;
</description></item></channel></rss>