bool SetBreakpointList(OdId tObject, SetBreakpointListArg tArg)
tObject. Moniker of the unit, with which code is debugged.
tArg. Operation execution parameters.
The SetBreakpointList operation sets breakpoints in debugged code.
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.
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.
{
"SetBreakpointList" :
{
"tObject" :
{
"id" : "CDFENMHJDPDCGOAEFECMBDAOCBFPPLDEHJLFMBPLOGEOFKMJ!M!302490"
},
"tArg" :
{
"breakpoints" :
{
"it" :
{
"moduleKey" : "302490",
"lineNumber" : "8",
"enabled" : "true",
"condition" : "t1>DateTime.Now",
"passCount" : "0"
}
}
}
}
}
{
"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: