When debugging LINQ to SQL code, did you wish you could easily see the SQL that gets executed? Of course there is the DataContext.Log property that is available for that. You can assign any TextWriter to this property. Console.Out is a good candidate for example, but it doesn't help much for web applications and doesn't integrate with Visual Studio nicely. Fortunately, Kris Vandermotten has a nice solution: DebuggerWriter. It's an implementation of TextWriter that writes to the debugger log.
With this solution, plug an instance of DebuggerWriter into your DataContext's Log property, and you'll be able to see the SQL queries appear in Visual Studio's Output window.
Cross-posted from http://linqinaction.net