I think the only way to get this information in .NET is with a debugger.
Otherwise, you will have to independently develop a solution for maintaining the state of the stack frame and a special way of exception logs. Basically you do the same thing that the memory profiler does, keep track of the instances created. This would be a huge success, even if you did not limit the amount of information that you register.
The best solution would be to use the Trace and Assert capabilities in the System.Diagnostics namespace to selectively monitor the status of the program or use the logging tool (log4net, EnterpriseLibrary, NLog, minimize your own simple) to flush the / stack / variable stream when you go .
In any case, adding all this additional information is a big overhead.
EDIT: I received the news of this project in my channel: NTrace . It looks like it will put a little more on what you are trying to do.
Garo yeriazarian
source share