Reputation: 1939
I'm trying to create a simple logger to check what's happening on the client-side. How can I get the list of locals (as displayed on visual studio while debugging)?
kind of like when a breakpoint is hit, the current existing instances of objects/variables are shown on the Locals tab or should I just get the variable's current value whenever I write on the log?
Upvotes: 4
Views: 2435
Reputation: 44605
Interesting thing...
I usually log all method parameters names and values with a combination of Reflection and runtime data, never thought about also catching local variables values...
here some info:
Accessing Local Variable Information
Upvotes: 5