| Generated: | opprotoc –rst-doc |
|---|---|
| Version: | 0.50 |
| Status: | Draft |
| Introduced: | core 2.4 |
service EcmascriptDebugger
{
option version = "5.0";
option core_release = "2.4";
command ListRuntimes(RuntimeSelection) returns RuntimeList = 1;
command ContinueThread(ThreadMode) returns Default = 2;
command Eval(EvalData) returns EvalResult = 3;
command ExamineObjects(ExamineList) returns ObjectList = 4;
command SpotlightObject(SpotlightObjectSelection) returns Default = 5;
command AddBreakpoint(BreakpointPosition) returns Default = 6;
command RemoveBreakpoint(BreakpointID) returns Default = 7;
command AddEventHandler(EventHandler) returns Default = 8;
command RemoveEventHandler(EventHandlerID) returns Default = 9;
command SetConfiguration(Configuration) returns Default = 10;
command GetBacktrace(BacktraceSelection) returns BacktraceFrameList = 11;
command Break(BreakSelection) returns Default = 12;
command InspectDom(DomTraversal) returns NodeList = 13;
command CssGetIndexMap(Default) returns CssIndexMap = 22;
command CssGetAllStylesheets(RuntimeID) returns CssStylesheetList = 23;
command CssGetStylesheet(CssStylesheetSelection) returns CssStylesheetRules = 24;
command CssGetStyleDeclarations(CssElementSelection) returns CssStyleDeclarations = 25;
command GetSelectedObject(Default) returns ObjectSelection = 26;
command SpotlightObjects(SpotlightSelection) returns Default = 27;
event OnRuntimeStarted returns RuntimeInfo = 14;
event OnRuntimeStopped returns RuntimeID = 15;
event OnNewScript returns ScriptInfo = 16;
event OnThreadStarted returns ThreadInfo = 17;
event OnThreadFinished returns ThreadResult = 18;
event OnThreadStoppedAt returns ThreadStopInfo = 19;
event OnHandleEvent returns DomEvent = 20;
event OnObjectSelected returns ObjectSelection = 21;
event OnParseError returns DomParseError = 28;
}
command ListRuntimes(RuntimeSelection) returns RuntimeList = 1;
argument:
message RuntimeSelection
{
repeated uint32 runtimeList = 1;
optional bool allRuntimes = 2;
}
returns:
message RuntimeList
{
message RuntimeInfo
{
required uint32 runtimeID = 1;
required string htmlFramePath = 2;
required uint32 windowID = 3;
required uint32 objectID = 4;
required string uri = 5;
}
repeated RuntimeInfo runtimeList = 1;
}
command ContinueThread(ThreadMode) returns Default = 2;
argument:
message ThreadMode
{
required uint32 runtimeID = 1;
required uint32 threadID = 2;
required string mode = 3;
}
returns:
message Default
{
}
command Eval(EvalData) returns EvalResult = 3;
argument:
message EvalData
{
message Variable
{
required string name = 1;
required uint32 objectID = 2;
}
required uint32 runtimeID = 1;
/**
* The ID of the thread to use for executing the script data, or 0
*/
required uint32 threadID = 2;
required uint32 frameIndex = 3;
required string scriptData = 4;
repeated Variable variableList = 5;
}
returns:
message EvalResult
{
message ObjectValue
{
required uint32 objectID = 1;
required bool isCallable = 2;
required bool isFunction = 3;
// type, function or object
required string type = 4;
optional uint32 prototypeID = 5;
// Name of class (object) or function
optional string name = 6;
}
required string status = 1;
required string type = 2;
// Only present for `Number`, `String` or `Boolean`
optional string value = 3;
// Only present for `Object`
optional ObjectValue objectValue = 4;
}
command ExamineObjects(ExamineList) returns ObjectList = 4;
argument:
message ExamineList
{
required uint32 runtimeID = 1;
repeated uint32 objectList = 2;
}
returns:
message ObjectList
{
message ObjectInfo
{
required ObjectValue value = 1;
repeated Property propertyList = 2;
}
message ObjectValue
{
required uint32 objectID = 1;
required bool isCallable = 2;
required bool isFunction = 3;
// type, function or object
required string type = 4;
optional uint32 prototypeID = 5;
// Name of class (object) or function
optional string name = 6;
}
message Property
{
required string name = 1;
required string type = 2;
// Only present for `Number`, `String` or `Boolean`
optional string value = 3;
// Only present for `Object`
optional ObjectValue objectValue = 4;
}
repeated ObjectInfo objectList = 1;
}
command SpotlightObject(SpotlightObjectSelection) returns Default = 5;
argument:
message SpotlightObjectSelection
{
required uint32 objectID = 1;
/**
* Chooses whether the given object should be scrolled into view or not.
*/
required bool scrollIntoView = 2;
}
returns:
message Default
{
}
command AddBreakpoint(BreakpointPosition) returns Default = 6;
argument:
message BreakpointPosition
{
required uint32 breakpointID = 1;
required string type = 2;
// Present when `Type` is `Line`
optional uint32 scriptID = 3;
// Present when `Type` is `Line`
optional uint32 lineNumber = 4;
// Present when `Type` is `Event`
optional string eventType = 5;
}
returns:
message Default
{
}
command RemoveBreakpoint(BreakpointID) returns Default = 7;
argument:
message BreakpointID
{
required uint32 breakpointID = 1;
}
returns:
message Default
{
}
command AddEventHandler(EventHandler) returns Default = 8;
argument:
// Add an event handler. This will generate a HANDLE-EVENT event every time the XML event defined by the pair (NAMESPACE, EVENT-TYPE) reaches the object defined by OBJECT-ID in the capturing phase. XML events are defined in http://www.w3.org/TR/xml-events
message EventHandler
{
// `handlerID` is set by the client and is referred to by both client and host.
required uint32 handlerID = 1;
required uint32 objectID = 2;
// Namespace of the event. If empty, it will match any namespace.
required string namespace = 3;
required string eventType = 4;
// Prevents the default event handler from running.
required bool preventDefaultHandler = 5;
// Stops propagation of the event beyond this `objectID` (it will however run for all handlers on the object).
required bool stopPropagation = 6;
}
returns:
message Default
{
}
command RemoveEventHandler(EventHandlerID) returns Default = 9;
argument:
message EventHandlerID
{
// `handlerID` as specified in EventHandler.handlerID.
required uint32 handlerID = 1;
}
returns:
message Default
{
}
command SetConfiguration(Configuration) returns Default = 10;
argument:
message Configuration
{
optional bool stopAtScript = 1;
optional bool stopAtException = 2;
optional bool stopAtError = 3;
optional bool stopAtAbort = 4;
optional bool stopAtGc = 5;
optional bool stopAtDebuggerStatement = 6;
}
returns:
message Default
{
}
command GetBacktrace(BacktraceSelection) returns BacktraceFrameList = 11;
argument:
message BacktraceSelection
{
required uint32 runtimeID = 1;
required uint32 threadID = 2;
// If `maxFrames` is omitted, all frames are returned
optional uint32 maxFrames = 3;
}
returns:
message BacktraceFrameList
{
message BacktraceFrame
{
required uint32 functionID = 1;
required uint32 argumentObject = 2;
required uint32 variableObject = 3;
required uint32 thisObject = 4;
optional ObjectValue objectValue = 5;
optional uint32 scriptID = 6;
optional uint32 lineNumber = 7;
}
message ObjectValue
{
required uint32 objectID = 1;
required bool isCallable = 2;
required bool isFunction = 3;
// type, function or object
required string type = 4;
optional uint32 prototypeID = 5;
// Name of class (object) or function
optional string name = 6;
}
repeated BacktraceFrame frameList = 1;
}
command Break(BreakSelection) returns Default = 12;
argument:
message BreakSelection
{
required uint32 runtimeID = 1;
required uint32 threadID = 2;
}
returns:
message Default
{
}
command InspectDom(DomTraversal) returns NodeList = 13;
argument:
message DomTraversal
{
required uint32 objectID = 1;
/**
* traversal on off:
* - parent-node-chain-with-children
* take the parent node chain for the target node.
* add for each node in that chain all children,
* and for all children there first child,
* if that is a text node and the only node,
* starting with the document node.
* - children
* get node data for all children in their flow
* - node
* get node data for that node
* - subtree
* get node data for the subtree in the flow of it
*/
required string traversal = 2;
}
returns:
message NodeList
{
message NodeInfo
{
required uint32 objectID = 1;
required uint32 type = 2;
required string name = 3;
required uint32 depth = 4;
optional string namespacePrefix = 5;
repeated Attribute attributeList = 6;
optional uint32 childrenLength = 7;
optional string value = 8;
optional string publicID = 9;
optional string systemID = 10;
}
message Attribute
{
required string namePrefix = 1;
required string name = 2;
required string value = 3;
}
repeated NodeInfo nodeList = 1;
}
command CssGetIndexMap(Default) returns CssIndexMap = 22;
argument:
message Default
{
}
returns:
message CssIndexMap
{
repeated string nameList = 1;
}
command CssGetAllStylesheets(RuntimeID) returns CssStylesheetList = 23;
argument:
message RuntimeID
{
required uint32 runtimeID = 1;
}
returns:
message CssStylesheetList
{
message Stylesheet
{
required uint32 objectID = 1;
required bool isDisabled = 2;
required string href = 3;
required string title = 4;
required string type = 5;
repeated string mediaList = 6;
optional uint32 ownerNodeID = 7;
optional uint32 ownerRuleID = 8;
optional uint32 parentStylesheetID = 9;
}
repeated Stylesheet stylesheetList = 1;
}
command CssGetStylesheet(CssStylesheetSelection) returns CssStylesheetRules = 24;
argument:
message CssStylesheetSelection
{
required uint32 runtimeID = 1;
required uint32 stylesheetID = 2;
}
returns:
message CssStylesheetRules
{
message StylesheetRule
{
required uint32 type = 1;
required uint32 stylesheetID = 2;
required uint32 ruleID = 3;
repeated uint32 indexList = 4;
repeated string valueList = 5;
repeated bool priorityList = 6;
// 0..1 for PAGE and 0..* for STYLE
repeated string selectorList = 7;
// 1..1 for PAGE and 0..* for STYLE
repeated uint32 specificityList = 8;
repeated string mediaList = 9;
repeated StylesheetRule ruleList = 10;
optional string href = 11;
optional uint32 importStylesheetID = 12;
optional uint32 pseudoClass = 13;
optional string charset = 14;
}
repeated StylesheetRule ruleList = 1;
}
command CssGetStyleDeclarations(CssElementSelection) returns CssStyleDeclarations = 25;
argument:
message CssElementSelection
{
required uint32 runtimeID = 1;
required uint32 objectID = 2;
}
returns:
message CssStyleDeclarations
{
message NodeStyle
{
required uint32 objectID = 1;
required string elementName = 2;
repeated StyleDeclaration styleList = 3;
}
message StyleDeclaration
{
required uint32 origin = 1;
repeated uint32 indexList = 2;
repeated string valueList = 3;
repeated bool priorityList = 4;
repeated uint32 statusList = 5;
optional string selector = 6;
optional uint32 specificity = 7;
optional uint32 stylesheetID = 8;
optional uint32 ruleID = 9;
optional uint32 ruleType = 10;
}
repeated string computedStyleList = 1;
repeated NodeStyle nodeStyleList = 2;
}
command GetSelectedObject(Default) returns ObjectSelection = 26;
argument:
message Default
{
}
returns:
message ObjectSelection
{
required uint32 objectID = 1;
required uint32 windowID = 2;
optional uint32 runtimeID = 3;
}
command SpotlightObjects(SpotlightSelection) returns Default = 27;
argument:
// To highlight elements in the document
message SpotlightSelection
{
// The drawing order is box, reference-box-frame, box-frame, grid.
message SpotlightObject
{
required uint32 objectID = 1;
// Chooses whether the given object should be scrolled into view or not.
required bool scrollIntoView = 2;
repeated SpotlightBox boxList = 3;
}
/**
* Colors are encoded as RGBA with 8 bits for each channel.
* encoded_color = ( red << 24 ) + ( green << 16 ) + ( blue << 8 ) + ( alpha )
* with red, green, blue and alpha in a range of 0 - 255
* e.g.:
*
* red 4278190335
* green 16711935
* blue 65535
* yellow 4294902015
* cyan 16777215
* magenta 4278255615
*/
message SpotlightBox
{
/**
* Valid values:
* 0: dimension
* 1: padding
* 2: border
* 3: margin
*/
required uint32 boxType = 1;
optional uint32 fillColor = 2;
// Drawn with 1px width inside the box
optional uint32 frameColor = 3;
// Drawn with 1px width inside the box over the whole document
optional uint32 gridColor = 4;
}
repeated SpotlightObject spotlightObjectList = 1;
}
returns:
message Default
{
}
event OnRuntimeStarted returns RuntimeInfo = 14;
message:
message RuntimeInfo
{
required uint32 runtimeID = 1;
required string htmlFramePath = 2;
required uint32 windowID = 3;
required uint32 objectID = 4;
required string uri = 5;
}
event OnRuntimeStopped returns RuntimeID = 15;
message:
message RuntimeID
{
required uint32 runtimeID = 1;
}
event OnNewScript returns ScriptInfo = 16;
message:
message ScriptInfo
{
required uint32 runtimeID = 1;
required uint32 scriptID = 2;
required string scriptType = 3;
required string scriptData = 4;
// present if `scriptType` is Linked
optional string uri = 5;
}
event OnThreadStarted returns ThreadInfo = 17;
message:
message ThreadInfo
{
required uint32 runtimeID = 1;
required uint32 threadID = 2;
required uint32 parentThreadID = 3;
required string threadType = 4;
// present if `threadType` is Event
optional string eventNamespace = 5;
// present if `threadType` is Event
optional string eventType = 6;
}
event OnThreadFinished returns ThreadResult = 18;
message:
message ThreadResult
{
required uint32 runtimeID = 1;
required uint32 threadID = 2;
required string status = 3;
}
event OnThreadStoppedAt returns ThreadStopInfo = 19;
message:
message ThreadStopInfo
{
required uint32 runtimeID = 1;
required uint32 threadID = 2;
required uint32 scriptID = 3;
required uint32 lineNumber = 4;
required string stoppedReason = 5;
optional uint32 breakpointID = 6;
}
event OnHandleEvent returns DomEvent = 20;
message:
message DomEvent
{
required uint32 objectID = 1;
required uint32 handlerID = 2;
required string eventType = 3;
}
event OnObjectSelected returns ObjectSelection = 21;
message:
message ObjectSelection
{
required uint32 objectID = 1;
required uint32 windowID = 2;
optional uint32 runtimeID = 3;
}
event OnParseError returns DomParseError = 28;
message:
message DomParseError
{
required uint32 runtimeID = 1;
required uint32 scriptID = 2;
required uint32 lineNumber = 3;
required uint32 offset = 4;
required string context = 5;
required string description = 6;
}