finds.dev

benaadams/Ben.Demystifier

High performance understanding for stack traces (Make error logs more productive)

View on GitHub

★ 2,868C#Apache-2.0updated Mar 2024

// the take

Ben.Demystifier translates .NET stack traces from the compiler-mangled IL representation back into readable C# source format — async state machines become `async Task<string> MethodAsync()`, lambdas get source location and ordinal instead of `<>c__DisplayClass`, generics resolve their type parameters. It's a one-line drop-in for exception formatting. Written by Ben Adams, who spent years on ASP.NET Core performance, so the implementation is unusually careful.

The before/after comparison in the README makes the value immediate and concrete — this isn't overselling. The approach uses reflection and portable PDB data rather than a hack, so it handles edge cases (local functions, value tuples, ref returns) that simpler approaches miss. It's already integrated into Serilog, Exceptional, and ASP.NET Core's developer exception page, which means it's been battle-tested in production at scale. Test coverage is solid and covers the awkward cases: async enumerables, dynamic compilation, recursive stacks, mixed managed/native.

Last meaningful commit was early 2024 and the repo shows signs of maintenance drift — open issues with no response, benchmarks still reference `netcoreapp2.0`. The core functionality works, but it leans on reflection internals that can shift between .NET runtime versions, and there's no explicit statement of .NET 8/9/10 support. Portable PDB reading is a footgun: if you deploy without PDBs (common in production), you get degraded output without a clear warning about why. The IL reader for resolving method display is non-trivial and largely undocumented — modifying it is not for the faint-hearted.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,868
Forks
122
Language
C#
License
Apache-2.0
Last commit
14 Mar 2024

// nearby

If Ben.Demystifier isn't quite it.

All repos →