ExpressionTreeVisualizer icon indicating copy to clipboard operation
ExpressionTreeVisualizer copied to clipboard

Watch expression on value opened in new window

Open zspitz opened this issue 6 years ago • 3 comments

When opening the value of an expression node in a new window, the WatchExpressionFormatString for the root ExpressionNodeData needs to be updated to the parent root.

zspitz avatar Jun 26 '19 15:06 zspitz

We can either recreate the watch expression in the ResolvePath function, or we can pass it along when setting the Path.

zspitz avatar Jun 26 '19 15:06 zspitz

Two functions:

  1. generate cast + access from a single path component
  2. generate cast and access from a full path

Part of the second function would be to handle values:

  • if the object is a ConstantExpression then use the Value property and cast to the narrowest public type of the object at the Value property
  • if the object is a closed-over variable MemberAccessExpression then copy the logic from ExtractValue -- wrap in a call to Lambda, Compile and Invoke

zspitz avatar Jun 26 '19 15:06 zspitz

If the debugged expression has been set in the source window, pass it along with the options.

zspitz avatar Jun 26 '19 15:06 zspitz