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:

v2 translation

…for the same Expression, v3 displays this:

v3 translation

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):

v3 dark theme

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

v3 out param declared inline

…and perhaps you’d rather use the parameter type name, instead of var:

v3 out param declared with type name

…or be shown the type of the lambda’s ip parameter:

v3 with lambda parameter type name

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 :)