SetBreakpointList

Syntax

bool SetBreakpointList(OdId tObject, SetBreakpointListArg tArg)

Parameters

tObject. Moniker of the unit, with which code is debugged.

tArg. Operation execution parameters.

Description

The SetBreakpointList operation sets breakpoints in debugged code.

Comments

To execute the operation, in the tObject field specify moniker of the object that is started for debugging or is running in the debugging mode, and in the tArg field specify parameters of set breakpoints.

The operation results in the logical True if breakpoints were set successfully.

Example

Below is the example of setting a breakpoint in code. The request contains moniker of the unit that is running in the debugging mode and information about set breakpoint. The response contains whether a breakpoint is successfully created.

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">
<SetBreakpointList xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>CDFENMHJDPDCGOAEFECMBDAOCBFPPLDEHJLFMBPLOGEOFKMJ!M!302490</id>
  </tObject>
<tArg xmlns="">
<breakpoints>
<it>
  <moduleKey>302490</moduleKey>
  <lineNumber>8</lineNumber>
  <enabled>true</enabled>
  <condition>t1>DateTime.Now</condition>
  <passCount>0</passCount>
  </it>
  </breakpoints>
  </tArg>
  </SetBreakpointList>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetBreakpointListResult 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">1</SetBreakpointListResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetBreakpointList" :
{
"tObject" :
{
"id" : "CDFENMHJDPDCGOAEFECMBDAOCBFPPLDEHJLFMBPLOGEOFKMJ!M!302490"
},
"tArg" :
{
"breakpoints" :
{
"it" :
{
"moduleKey" : "302490",
"lineNumber" : "8",
"enabled" : "true",
"condition" : "t1>DateTime.Now",
"passCount" : "0"
}
}
}
}
}

JSON response:

{
"SetBreakpointListResult" : "1"
}
public static bool SetBreakpoints(MbId mb, string modId, uint debugModKey, int stopLineNumber, string breakCondition = "")
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetBreakpointList()
{
tArg = new SetBreakpointListArg()
{
breakpoints = new BreakpointStruct[]
{
new BreakpointStruct
{
moduleKey = debugModKey,
lineNumber = stopLineNumber,
enabled = true,
condition = breakCondition,
passCount = 0
}
}
},
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, modId).k },
};
// Create a breakpoint
var result = somClient.SetBreakpointList(tSet);
return result;
}

See also:

Working with Development Environment