获取运行时本地对象/变量列表 [英] Get list of local objects/variables during runtime
问题描述
我试图创建一个简单的记录,检查发生的事情在客户端。我怎样才能得到当地人的列表(在Visual Studio中所显示的同时调试)?
那种喜欢当一个断点被命中,对象/变量的当前现有实例显示在当地人选项卡上或者我应该只得到变量的当前值,每当我写的日志?
有趣的事情。 ..
我通常记录所有的方法参数名称和值与反思和运行数据,从来没有想过也赶上局部变量值的组合...
的 一些信息在这里 - 本地 - 可变信息/相对=nofollow>访问本地变量
资料
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?
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
这篇关于获取运行时本地对象/变量列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!