Settings and activity
2 results found
-
276 votes
An error occurred while saving the comment An error occurred while saving the comment anunay commentedThis works if your project is simple library or a console app. In my case the VS project I'm working on is huge with over 15+ references.The variables I want to dump exist in deep nested classes which can only be instantiated after multiple UI interaction setps. I just can't call my project from Linqpad without making some serious changes to it.
anunay shared this idea · -
338 votesanunay supported this idea ·
Hi Joe
Thanks for exposing this functionally in the new Beta. Since I can't use Dump directly, I have created a new extension method Print as follows
static class Extension
{
public static string Print<T>(this T o)
{
var writer = LINQPad.Util.CreateXhtmlWriter();
writer.Write(o);
return writer.ToString();
}
}
To view contents of any variable during debugging, I simply add myVariable.Print() to the watch window and use Visual Studios build in HTML visualizer to see formatted XHTML.
Thanks a ton
Anunay