I am using MDBG to debug running process, but i don't know how to check a value of static variable. Is there some way to do it? Thanks.
Asked
Active
Viewed 465 times
1 Answers
0
MDbg can capture "local" variables - I assume this means staic as well. If the variable is associated with a stack frame, you can get the value using the GetActiveLocalVars function.
MDbgThread t = proc.Threads.Active;
MDbgFrame f=t.CurrentFrame;
foreach (MDbgValue v in f.Function.GetActiveLocalVars(f))
{
Console.WriteLine(v.Name);
Console.WriteLine(v.Value);
}

Brian Donahue
- 216
- 1
- 3