I would like to write a reusable function I can call within any method to log a snapshot of all the local variables. For example:
void somemethod()
Consider to write minidumps using a custom PostSharp aspect (with IL transformation).
A shared debuging engine library, written in C#. is available on NuGet as Microsoft.Samples.Debugging.MdbgEngine.
The code of PostSharp aspect is available on GitHub as part of the PADRE ( Pluggable Automatic Debugging and Reporting Engine)repository