Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LINQPad: Anyway to make the Dump() results be initially collapsed?

Couldn't find it anywhere (google or stackoverflow).

Is there a way to force Dump()'s output to be automatically collapsed?

Update:

Some more info, to bring more focus to the question.
As mentioned below Collapsing can be done after the output as rendered via keyboard shortcust (Alt+1, Alt+2, Alt+3) And can rendering depth can be determined by passing an int depth param, but that does not allow to expand the results.

Is there some way to change the CSS formatting? I'm not that fluent in CSS, so this might be the solution.

Why I need this:

What I want is to make the output 'cleaner', and dive in when something of interest show's up. I'm running a query repeatedly, and don't need all of the output all the time, but still using my human abilities to detect change, instead of coding the detection.

Update: November 2013

As Joe (the author himself!) mentions in the comments, LINQPad no longer has the limitation described. It is now possible to state 0 and collapse the information after it's rendered.

like image 799
Lockszmith Avatar asked Apr 22 '12 08:04

Lockszmith


1 Answers

No, although you can call Dump with a number to force it to display to that nesting depth:

.Dump(0)

You can also use the formatting shortcuts (Alt+1, Alt+2, Alt+3) to collapse the whole display to one, two or three levels.

Another option is to dump to grids. Call Dump(true) or use the toolbar button. Grids show only one level and subsequent levels are shown upon demand with hyperlinks.

like image 114
Joe Albahari Avatar answered Oct 26 '22 09:10

Joe Albahari