Not quite sure what you're looking for, but yes, it is possible to enumerate variables and their values through the interfaces. For global variables in script modules you'll use the
asIScriptModule interface, specifically the GetGlobalVarCount, GetGlobalVar, and GetAddressOfGlobalVar methods. For local variables in script functions you'll use the
asIScriptContext interface, specifically the GetVarCount, GetVarName, and GetAddressOfVar methods. Of course, for local variables you'll need to execute the script and access the variables when you're in the function (either by suspending the context, or accessing them from the line callback, or even from an application registered function called from the script function).