I am implementing a debugger for Vbscript using Clearscript which is expected to display all the variables and their values upon hitting break point.
I am able to fetch all the variables using following code:
public static VBScriptEngine engine;
dynamic ome = engine.Evaluate("me");
foreach (var name in ome.GetDynamicMemberNames())
Console.WriteLine("{0}: {1}", name, ome[name]);
The challenge here i am facing is that i am not able to fetch the context specific variables: e.g. A break point is set inside a function then upon hitting the break-point the variable list gets empty as per the above code.
Is there a way to fetch the context specific variables also(the variables inside the function)
Consider the following code:
abc = 123
def = 1432
Call hello()
Function hello()
jas=123
[breakpoint]
ja = 14
End Function
Here on hitting the breakpoint it should display jas = 123
Please help!
You can see the reply from Clear script here: https://clearscript.codeplex.com/discussions/640552#post1432299