DebugModule

Syntax

DebugStateResult DebugModule(OdId tObject, DebugModuleArg tArg)

Parameters

tObject. Moniker of the development environment object, which debugging should be controlled.

tArg. Operation execution parameters.

Description

The DebugModule operation enables the user to control unit code debugging process.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DebugModule xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>CDFENMHJDPDCGOAEFECMBDAOCBFPPLDEHJLFMBPLOGEOFKMJ!M!302490</id>
  </tObject>
<tArg xmlns="">
  <command>Start</command>
  </tArg>
  </DebugModule>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<DebugModuleResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <debugState xmlns="">Running</debugState>
  </DebugModuleResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"DebugModule" :
{
"tObject" :
{
"id" : "CDFENMHJDPDCGOAEFECMBDAOCBFPPLDEHJLFMBPLOGEOFKMJ!M!302490"
},
"tArg" :
{
"command" : "Start"
}
}
}

JSON response:

{
"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:

Working with Development Environment