GetStackFrameListResult GetStackFrameList(OdId tObject)
tObject. Moniker of the development environment object, for which debugging is running.
The GetStackFrameList operation gets call stack during code debugging.
The operation gets a list of all subprograms executed during application debugging. To execute the operation, in the tObject field specify moniker of the object started for debugging. The object moniker can be obtained on executing the GetObjects operation. An object can be started for debugging using the DebugModule operation.
The operation results in the collection of call stack elements.
Below is the example of getting call stack during code debugging. The request contains moniker of debugged unit. The response contains the obtained call stack of procedures/functions.
{
"GetStackFrameList" :
{
"tObject" :
{
"id" : "KDNGAKLFDHAOFOAEDIBJJNCFPBMEPGOEAKMGMFICJIGJLLAN!M!305352"
}
}
}
{
"GetStackFrameListResult" :
{
"stackFrames" :
{
"it" :
[
{
"method" : "TObject.GetState",
"moduleName" : "M_STACKFRAMELIST",
"line" : "21"
},
{
"method" : "TObject.Run",
"moduleName" : "M_STACKFRAMELIST",
"line" : "13"
},
{
"method" : "Main",
"moduleName" : "M_STACKFRAMELIST",
"line" : "5"
}
]
}
}
}
public static GetStackFrameListResult GetStackFrameList(MbId mb, string modId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetStackFrameList()
{
// Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, modId).k }
};
// Get call stack
var result = somClient.GetStackFrameList(tGet);
return result;
}
See also: