any generic way to trace/log values of all local variables when an exception occurs in a method? (in C# 3)
Use MiniDumpWriteDump to create a memory dump of the process at the point of the exception. You would have to P/Invoke it.