DebugStateResult DebugModule(OdId tObject, DebugModuleArg tArg)
tObject. Moniker of the development environment object, which debugging should be controlled.
tArg. Operation execution parameters.
The DebugModule operation enables the user to control unit code debugging process.
The operation starts application code for debugging and controls debugging. To execute the operation, in the tObject field specify moniker of the repository object that is a unit. The object moniker can be obtained on executing the GetObjects operation. In the tArg.command field specify the command executed for debugged object.
The operation results in the information about the current status of object debugging.
Below is the example of starting unit code for debugging. The request contains moniker of the repository object that is a unit. The response contains the current debugging status. The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"DebugModule" :
{
"tObject" :
{
"id" : "CDFENMHJDPDCGOAEFECMBDAOCBFPPLDEHJLFMBPLOGEOFKMJ!M!302490"
},
"tArg" :
{
"command" : "Start"
}
}
}
{
"DebugModuleResult" :
{
"debugState" : "Running"
}
}
public static DebugStateResult DebugModule(MbId mb, string modId, DebugCommand dCommand)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new DebugModule()
{
tArg = new DebugModuleArg()
{
command = dCommand
},
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, modId).k }
};
// Control unit debugging
var result = somClient.DebugModule(tGet);
return result;
}
See also: