Skip to content
Zev Spitz edited this page Dec 30, 2019 · 19 revisions

Welcome to Expression Tree Visualizer. This is a Visual Studio debugging visualizer for inspecting expression trees (and related types):

Treeview parts

The UI consists of the following parts:

  1. Treeview showing the structure of the expression tree
  2. Source code representation of the tree, using the string rendering library
  3. End nodes -- expressions that aren't composed of other expressions:
    • Parameters of lambda expressions
    • Closed-over variables from an outside scope
    • Constant values
    • Default values of the specified type
  4. Settings
  5. Debugged expression, used by the Copy watch expression command

End nodes

Each end node type has various properties, but not all properties are relevant to all end node types, e.g. parameters don't have a value, because the value is passed into the function call:

Description Parameters Closed-over variables Constants Defaults
Name y y
Type
The CLR type of the expression which the node represents
y y y y
Value y y y
Closure
The name of the variable's scope
y

Note that even though closed-over variables are technically member-access expressions (on a compiler-generated hidden class instance), it's more useful to treat them as end nodes.

Settings

Click the gear:

Gear button

to open the settings popup:

Settings popup

The Formatter and Language settings correspond to the formatter and language parameters used by the string rendering library.

Note that the Language setting also affects how types and literals are shown in the rest of the visualizer, e.g. (int vs. Integer, and true vs. True):

Language setting affects other parts of the tree

Clone this wiki locally