layout | title | excerpt | tags | images_dir | |||
---|---|---|---|---|---|---|---|
post |
ReadableExpressions v3 Released |
The ReadableExpressions Expression debugger visualizers now show colourized, themeable source code, with a variety of translation options. |
|
2020-05-01/ |
ReadableExpressions translates Expression trees to source code as an alternative to Visual Studio's Debug View. There's a set of [Debugger Visualizers]({{ site.re_viz }}) in the Visual Studio Marketplace, and [a NuGet package]({{ site.re_nuget }}) with the extension method which does all the magic.
ReadableExpressions version 3 provides various options to customise translation, and colourizes the visualizer source code view, adding light and dark themes.
For a simple lambda calling a TryGet
-style method on its parameter and returning the out
parameter
value, ReadableExpressions v2 displays this:

...for the same Expression, v3 displays this:

Colourized with Visual Studio 2019's light theme colours!
The options menu let you switch the theme - perhaps you prefer dark? (as I obviously do):

There's also various ways to customise the translation - maybe you'd prefer to declare out parameter variable inline:

...and perhaps you'd rather use the parameter type name, instead of var
:

...or be shown the type of the lambda's ip
parameter:

I'll be adding extra options in the future, but I think these are a good start to make the source code view more personalisable and transparent. If there's any other options you'd find useful, please do let me know in a comment or in the [GitHub issues]({{ site.re_github }}/issues) :)