| OLD | NEW |
| 1 # Dart VM Service Protocol 3.0 | 1 # Dart VM Service Protocol 3.0 |
| 2 | 2 |
| 3 > Please post feedback to the [observatory-discuss group][discuss-list] | 3 > Please post feedback to the [observatory-discuss group][discuss-list] |
| 4 | 4 |
| 5 This document describes of _version 3.0_ of the Dart VM Service Protocol. This | 5 This document describes of _version 3.0_ of the Dart VM Service Protocol. This |
| 6 protocol is used to communicate with a running Dart Virtual Machine. | 6 protocol is used to communicate with a running Dart Virtual Machine. |
| 7 | 7 |
| 8 To use the Service Protocol, start the VM with the *--observe* flag. | 8 To use the Service Protocol, start the VM with the *--observe* flag. |
| 9 The VM will start a webserver which services protocol requests via WebSocket. | 9 The VM will start a webserver which services protocol requests via WebSocket. |
| 10 It is possible to make HTTP (non-WebSocket) requests, | 10 It is possible to make HTTP (non-WebSocket) requests, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 - [Class](#class) | 51 - [Class](#class) |
| 52 - [ClassList](#classlist) | 52 - [ClassList](#classlist) |
| 53 - [Code](#code) | 53 - [Code](#code) |
| 54 - [CodeKind](#codekind) | 54 - [CodeKind](#codekind) |
| 55 - [Context](#context) | 55 - [Context](#context) |
| 56 - [ContextElement](#contextelement) | 56 - [ContextElement](#contextelement) |
| 57 - [Error](#error) | 57 - [Error](#error) |
| 58 - [ErrorKind](#errorkind) | 58 - [ErrorKind](#errorkind) |
| 59 - [Event](#event) | 59 - [Event](#event) |
| 60 - [EventKind](#eventkind) | 60 - [EventKind](#eventkind) |
| 61 - [ExtensionData](#extensiondata) |
| 61 - [Field](#field) | 62 - [Field](#field) |
| 62 - [Flag](#flag) | 63 - [Flag](#flag) |
| 63 - [FlagList](#flaglist) | 64 - [FlagList](#flaglist) |
| 64 - [Frame](#frame) | 65 - [Frame](#frame) |
| 65 - [Function](#function) | 66 - [Function](#function) |
| 66 - [Instance](#instance) | 67 - [Instance](#instance) |
| 67 - [Isolate](#isolate) | 68 - [Isolate](#isolate) |
| 68 - [Library](#library) | 69 - [Library](#library) |
| 69 - [LibraryDependency](#librarydependency) | 70 - [LibraryDependency](#librarydependency) |
| 70 - [MapAssociation](#mapassociation) | 71 - [MapAssociation](#mapassociation) |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 subscribed) error code is returned. | 712 subscribed) error code is returned. |
| 712 | 713 |
| 713 The _streamId_ parameter may have the following published values: | 714 The _streamId_ parameter may have the following published values: |
| 714 | 715 |
| 715 streamId | event types provided | 716 streamId | event types provided |
| 716 -------- | ----------- | 717 -------- | ----------- |
| 717 VM | VMUpdate | 718 VM | VMUpdate |
| 718 Isolate | IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate, ServiceExte
nsionAdded | 719 Isolate | IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate, ServiceExte
nsionAdded |
| 719 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException
, Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect | 720 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException
, Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect |
| 720 GC | GC | 721 GC | GC |
| 722 Extension | Extension |
| 721 | 723 |
| 722 Additionally, some embedders provide the _Stdout_ and _Stderr_ | 724 Additionally, some embedders provide the _Stdout_ and _Stderr_ |
| 723 streams. These streams allow the client to subscribe to writes to | 725 streams. These streams allow the client to subscribe to writes to |
| 724 stdout and stderr. | 726 stdout and stderr. |
| 725 | 727 |
| 726 streamId | event types provided | 728 streamId | event types provided |
| 727 -------- | ----------- | 729 -------- | ----------- |
| 728 Stdout | WriteEvent | 730 Stdout | WriteEvent |
| 729 Stderr | WriteEvent | 731 Stderr | WriteEvent |
| 730 | 732 |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 // This is provided for the WriteEvent event. | 1137 // This is provided for the WriteEvent event. |
| 1136 string bytes [optional]; | 1138 string bytes [optional]; |
| 1137 | 1139 |
| 1138 // The argument passed to dart:developer.inspect. | 1140 // The argument passed to dart:developer.inspect. |
| 1139 // | 1141 // |
| 1140 // This is provided for the Inspect event. | 1142 // This is provided for the Inspect event. |
| 1141 @Instance inspectee [optional]; | 1143 @Instance inspectee [optional]; |
| 1142 | 1144 |
| 1143 // The RPC name of the extension that was added. | 1145 // The RPC name of the extension that was added. |
| 1144 // | 1146 // |
| 1145 // This is provided for the ServiceExtensionAdded. | 1147 // This is provided for the ServiceExtensionAdded event. |
| 1146 string extensionRPC [optional]; | 1148 string extensionRPC [optional]; |
| 1149 |
| 1150 // The extension event kind. |
| 1151 // |
| 1152 // This is provided for the Extension event. |
| 1153 string extensionKind [optional]; |
| 1154 |
| 1155 // The extension event data. |
| 1156 // |
| 1157 // This is provided for the Extension event. |
| 1158 ExtensionData extensionData [optional]; |
| 1147 } | 1159 } |
| 1148 ``` | 1160 ``` |
| 1149 | 1161 |
| 1150 An _Event_ is an asynchronous notification from the VM. It is delivered | 1162 An _Event_ is an asynchronous notification from the VM. It is delivered |
| 1151 only when the client has subscribed to an event stream using the | 1163 only when the client has subscribed to an event stream using the |
| 1152 [streamListen](#streamListen) RPC. | 1164 [streamListen](#streamListen) RPC. |
| 1153 | 1165 |
| 1154 For more information, see [events](#events). | 1166 For more information, see [events](#events). |
| 1155 | 1167 |
| 1156 ### EventKind | 1168 ### EventKind |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 // A breakpoint has been removed. | 1217 // A breakpoint has been removed. |
| 1206 BreakpointRemoved, | 1218 BreakpointRemoved, |
| 1207 | 1219 |
| 1208 // A garbage collection event. | 1220 // A garbage collection event. |
| 1209 GC, | 1221 GC, |
| 1210 | 1222 |
| 1211 // Notification of bytes written, for example, to stdout/stderr. | 1223 // Notification of bytes written, for example, to stdout/stderr. |
| 1212 WriteEvent, | 1224 WriteEvent, |
| 1213 | 1225 |
| 1214 // Notification from dart:developer.inspect. | 1226 // Notification from dart:developer.inspect. |
| 1215 Inspect | 1227 Inspect, |
| 1228 |
| 1229 // Event from dart:developer.postEvent. |
| 1230 Extension |
| 1216 } | 1231 } |
| 1217 ``` | 1232 ``` |
| 1218 | 1233 |
| 1219 Adding new values to _EventKind_ is considered a backwards compatible | 1234 Adding new values to _EventKind_ is considered a backwards compatible |
| 1220 change. Clients should ignore unrecognized events. | 1235 change. Clients should ignore unrecognized events. |
| 1221 | 1236 |
| 1237 ### ExtensionData |
| 1238 |
| 1239 ``` |
| 1240 class ExtensionData { |
| 1241 } |
| 1242 ``` |
| 1243 |
| 1244 An _ExtensionData_ is an arbitrary map that can have any contents. |
| 1245 |
| 1222 ### Field | 1246 ### Field |
| 1223 | 1247 |
| 1224 ``` | 1248 ``` |
| 1225 class @Field extends @Object { | 1249 class @Field extends @Object { |
| 1226 // The name of this field. | 1250 // The name of this field. |
| 1227 string name; | 1251 string name; |
| 1228 | 1252 |
| 1229 // The owner of this field, which can be either a Library or a | 1253 // The owner of this field, which can be either a Library or a |
| 1230 // Class. | 1254 // Class. |
| 1231 @Object owner; | 1255 @Object owner; |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2289 ## Revision History | 2313 ## Revision History |
| 2290 | 2314 |
| 2291 version | comments | 2315 version | comments |
| 2292 ------- | -------- | 2316 ------- | -------- |
| 2293 1.0 | initial revision | 2317 1.0 | initial revision |
| 2294 2.0 | Describe protocol version 2.0. | 2318 2.0 | Describe protocol version 2.0. |
| 2295 3.0 | Describe protocol version 3.0. Added UnresolvedSourceLocation. Added Sen
tinel return to getIsolate. Add AddedBreakpointWithScriptUri. Removed Isolate.
entry. The type of VM.pid was changed from string to int. Added VMUpdate events
. Add offset and count parameters to getObject() and offset and count fields to
Instance. Added ServiceExtensionAdded event. | 2319 3.0 | Describe protocol version 3.0. Added UnresolvedSourceLocation. Added Sen
tinel return to getIsolate. Add AddedBreakpointWithScriptUri. Removed Isolate.
entry. The type of VM.pid was changed from string to int. Added VMUpdate events
. Add offset and count parameters to getObject() and offset and count fields to
Instance. Added ServiceExtensionAdded event. |
| 2296 | 2320 |
| 2297 | 2321 |
| 2298 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss | 2322 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss |
| OLD | NEW |