ReadableExpressions

screenshot of ReadableExpressions

ReadableExpressions

A library and Debugger Visualizer which translates Expression Trees into readable C# source code. .NET 3.5+ and .NET Standard 1.0+.

Overview:

ReadableExpressions is a tool that provides extension methods and a Debugger Visualizer for readable, source-code versions of Expression Trees and reflection objects like Type, FieldInfo, PropertyInfo, and more. It offers the functionality of customizing the visualizer themes and output using various options. However, there is a known issue with ASP.NET Core 5 due to a breaking change in .NET 5, requiring users to enable BinaryFormatter in Debug only to resolve debugging problems.

Features:

  • Debugger Visualizer: Provides readable, source-code versions of Expression Trees and reflection objects.
  • Themes: Offers Light and Dark themes for visualizers.
  • Customization: Allows customization of output using various options.
  • Extension Methods: Offers extension methods for translating Expressions, including DynamicLanguageRuntime expressions.
  • Compatibility: Targets .NET 3.5+ and .NETStandard 1.0+.

Installation:

To install the ReadableExpressions theme and debugger visualizer, follow these steps:

  1. Download the Debugger Visualizer installer from the Visual Studio Marketplace.
  2. Add the following code snippet to your ASP.NET Core csproj to enable BinaryFormatter in Debug only:
<PropertyGroup>
  <DebugType>portable</DebugType>
</PropertyGroup>
  1. Install the extension methods from NuGet using the following command:
dotnet add package ReadableExpressions
  1. Ensure your project targets .NET 3.5+ or .NETStandard 1.0+ for compatibility.

Summary:

ReadableExpressions is a useful tool for developers working with Expression Trees and reflection objects, offering a Debugger Visualizer with customizable themes and output options. Although there is a known issue with ASP.NET Core 5 due to changes in .NET 5, enabling BinaryFormatter in Debug mode resolves the problem. The extension methods are available on NuGet, licensed under the MIT license. For more information, refer to the documentation provided.