Is it possible to get parameters' values for each frame in call stack in .NET

后端 未结 2 1268
星月不相逢
星月不相逢 2020-12-01 16:45

I\'m talking about managed .NET code. If we run any program and attach VS to it we can see parameters\' values for each method in call stack. I\'d like to create a logging s

2条回答
  •  孤城傲影
    2020-12-01 17:43

    Your best option is probably to insert the required trace code in the relevant methods. That way you can attach trace listeners and dump values when needed.

    I know it is not what you're asking for, but it is one way to get the data.

    Alternatively, you can debug the application using WinDbg. The !clstack/!dso commands will let you inspect parameters and stack objects.

提交回复
热议问题