GetForeLocalVariableListResult GetForeLocalVariableList(GetForeLocalVariableListArg tArg)
tArg. Operation execution parameters.
The GetForeLocalVariableList operation gets information about local variables available during code block debugging.
To execute the operation, in the tArg field specify information about the unit under debugging.
The operation results in the list of names of local variables available in the code block under debugging.
Below is the example of getting the list of local variables. The request contains moniker of the unit started for debugging and the code line number. The response contains the list of local variables that are determined in the code block under debugging. The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"GetForeLocalVariableList" :
{
"tArg" :
{
"module" :
{
"id" : "CDFENMHJDPDCGOAEFECMBDAOCBFPPLDEHJLFMBPLOGEOFKMJ!M!302490"
},
"line" : "17"
}
}
}
{
"GetForeLocalVariableListResult" :
{
"varList" :
{
"it" :
[
"ci",
"i",
"t1",
"t2"
]
}
}
}
public static GetForeLocalVariableListResult GetForeLocalVariableList(MbId mb, string modId, int stopLineNumber = 0)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetForeLocalVariableList()
{
tArg = new GetForeLocalVariableListArg()
{
module = new OdId() { id = mb.id + "!" + FindObjectById(mb, modId).k },
line = stopLineNumber
}
};
// Get information about local variables
var result = somClient.GetForeLocalVariableList(tGet);
return result;
}
See also: