DebugStateResult GetDebugState(OdId tObject)
tObject. Moniker of the development environment object, for which debugging is running.
The GetDebugState operation gets information about object debugging status.
An object can be started for debugging using the DebugModule operation. To execute the GetDebugState operation, in the tObject field specify moniker of the object that was started for debugging. The object moniker can be obtained on executing the GetObjects operation.
The operation results in the information about the current debugging status and the text that can be displayed by the application during the debugging.
Below is the example of getting unit debugging execution status. The request contains moniker of the repository object started for debugging. The response contains the obtained information. The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"GetDebugState" :
{
"tObject" :
{
"id" : "CDFENMHJDPDCGOAEFECMBDAOCBFPPLDEHJLFMBPLOGEOFKMJ!M!302490"
}
}
}
{
"GetDebugStateResult" :
{
"debugState" : "Running",
"output" : "Application is started. Startup time: 14:41. "
}
}
public static DebugStateResult GetDebugState(MbId mb, string modId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetDebugState()
{
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, modId).k }
};
// Get unit debugging status
var result = somClient.GetDebugState(tGet);
return result;
}
See also: