ReadableExpressions translates Expression trees to source code as an alternative to Visual Studio’s Debug View. There’s a set of Debugger Visualizers in the Visual Studio Marketplace, and a NuGet package 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.
Now in Technicolor ©
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!
Translation options
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:
More to come
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 :)
Comments
0 comments