You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to plot double arrays when debugging by giving the variable's name to TextBox and clicking a button.
I made a tool window, and managed to get EnvDTE.Debugger to my tool window's code behind.
Now I can use the following code to get any string variable's value from it's name:
EnvDTE.Expression expr = Debugger.GetExpression(variableName);
if (expr.IsValidValue)
{
string type = expr.Type;
string value = expr.Value;
MessageBox.Show(type + " " + value);
}
But if I use the same trick to get double array's value, it just says {double[5]}.
So does anyone know how to get the array's values. I'm guessing I need to somehow get the memory address and parse the values from there, but I have no idea how to do this.
Also, can Microsoft.VisualStudio.Shell.Interop.IVsDebugger debugger = await VS.Services.GetDebuggerAsync() be used for getting debug variables, and if so how?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to be able to plot double arrays when debugging by giving the variable's name to TextBox and clicking a button.
I made a tool window, and managed to get EnvDTE.Debugger to my tool window's code behind.
Now I can use the following code to get any string variable's value from it's name:
But if I use the same trick to get double array's value, it just says {double[5]}.
So does anyone know how to get the array's values. I'm guessing I need to somehow get the memory address and parse the values from there, but I have no idea how to do this.
Also, can Microsoft.VisualStudio.Shell.Interop.IVsDebugger debugger = await VS.Services.GetDebuggerAsync() be used for getting debug variables, and if so how?
Any help is much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions