In a .net Exception how to get a stacktrace with argument values

I don’t think System.Diagnostics.StackFrame supplies argument information (other than the method signature).

You could instrument the troublesome calls with trace logging via AOP, or even use its exception interception features to conditionally log without having to litter your code. Have a look around http://www.postsharp.org/.

Leave a Comment