C# reusable function to dump current value of local variables

前端 未结 3 1093
攒了一身酷
攒了一身酷 2020-12-15 01:49

I would like to write a reusable function I can call within any method to log a snapshot of all the local variables. For example:

    void somemethod()
             


        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 02:11

    It is possible by using external debugger for managed code. See "managed debugger sample" for how it is done: http://blogs.msdn.com/b/jmstall/archive/2004/09/30/236281.aspx (includes link to the sample and more information)

提交回复
热议问题