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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
708 subscribed, the client will begin receiving events from the stream. | 708 subscribed, the client will begin receiving events from the stream. |
709 | 709 |
710 If the client is not subscribed to the stream, the _103_ (Stream already | 710 If the client is not subscribed to the stream, the _103_ (Stream already |
711 subscribed) error code is returned. | 711 subscribed) error code is returned. |
712 | 712 |
713 The _streamId_ parameter may have the following published values: | 713 The _streamId_ parameter may have the following published values: |
714 | 714 |
715 streamId | event types provided | 715 streamId | event types provided |
716 -------- | ----------- | 716 -------- | ----------- |
717 VM | VMUpdate | 717 VM | VMUpdate |
718 Isolate | IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate | 718 Isolate | IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate, ServiceExte nsionAdded |
719 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException , Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect | 719 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException , Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect |
720 GC | GC | 720 GC | GC |
721 | 721 |
722 Additionally, some embedders provide the _Stdout_ and _Stderr_ | 722 Additionally, some embedders provide the _Stdout_ and _Stderr_ |
723 streams. These streams allow the client to subscribe to writes to | 723 streams. These streams allow the client to subscribe to writes to |
724 stdout and stderr. | 724 stdout and stderr. |
725 | 725 |
726 streamId | event types provided | 726 streamId | event types provided |
727 -------- | ----------- | 727 -------- | ----------- |
728 Stdout | WriteEvent | 728 Stdout | WriteEvent |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1132 | 1132 |
1133 // An array of bytes, encoded as a base64 string. | 1133 // An array of bytes, encoded as a base64 string. |
1134 // | 1134 // |
1135 // This is provided for the WriteEvent event. | 1135 // This is provided for the WriteEvent event. |
1136 string bytes [optional]; | 1136 string bytes [optional]; |
1137 | 1137 |
1138 // The argument passed to dart:developer.inspect. | 1138 // The argument passed to dart:developer.inspect. |
1139 // | 1139 // |
1140 // This is provided for the Inspect event. | 1140 // This is provided for the Inspect event. |
1141 @Instance inspectee [optional]; | 1141 @Instance inspectee [optional]; |
1142 | |
1143 // The method name of the service extension that was added. | |
turnidge
2015/12/16 21:26:05
RPC name?
| |
1144 // | |
1145 // This is provided for the ServiceExtensionAdded. | |
1146 string serviceExtensionName [optional]; | |
turnidge
2015/12/16 21:26:05
extensionRPC
| |
1142 } | 1147 } |
1143 ``` | 1148 ``` |
1144 | 1149 |
1145 An _Event_ is an asynchronous notification from the VM. It is delivered | 1150 An _Event_ is an asynchronous notification from the VM. It is delivered |
1146 only when the client has subscribed to an event stream using the | 1151 only when the client has subscribed to an event stream using the |
1147 [streamListen](#streamListen) RPC. | 1152 [streamListen](#streamListen) RPC. |
1148 | 1153 |
1149 For more information, see [events](#events). | 1154 For more information, see [events](#events). |
1150 | 1155 |
1151 ### EventKind | 1156 ### EventKind |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1808 @Library[] libraries; | 1813 @Library[] libraries; |
1809 | 1814 |
1810 // A list of all breakpoints for this isolate. | 1815 // A list of all breakpoints for this isolate. |
1811 Breakpoint[] breakpoints; | 1816 Breakpoint[] breakpoints; |
1812 | 1817 |
1813 // The error that is causing this isolate to exit, if applicable. | 1818 // The error that is causing this isolate to exit, if applicable. |
1814 Error error [optional]; | 1819 Error error [optional]; |
1815 | 1820 |
1816 // The current pause on exception mode for this isolate. | 1821 // The current pause on exception mode for this isolate. |
1817 ExceptionPauseMode exceptionPauseMode; | 1822 ExceptionPauseMode exceptionPauseMode; |
1823 | |
1824 // The list of service extension methods that are registered on this isolate. | |
turnidge
2015/12/16 21:26:05
methods -> rpcs
| |
1825 string[] serviceExtensions; | |
turnidge
2015/12/16 21:26:05
serviceExtensions -> extensionRPCs
| |
1818 } | 1826 } |
1819 ``` | 1827 ``` |
1820 | 1828 |
1821 An _Isolate_ object provides information about one isolate in the VM. | 1829 An _Isolate_ object provides information about one isolate in the VM. |
1822 | 1830 |
1823 ### Library | 1831 ### Library |
1824 | 1832 |
1825 ``` | 1833 ``` |
1826 class @Library extends @Object { | 1834 class @Library extends @Object { |
1827 // The name of this library. | 1835 // The name of this library. |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2274 @Isolate[] isolates; | 2282 @Isolate[] isolates; |
2275 } | 2283 } |
2276 ``` | 2284 ``` |
2277 | 2285 |
2278 ## Revision History | 2286 ## Revision History |
2279 | 2287 |
2280 version | comments | 2288 version | comments |
2281 ------- | -------- | 2289 ------- | -------- |
2282 1.0 | initial revision | 2290 1.0 | initial revision |
2283 2.0 | Describe protocol version 2.0. | 2291 2.0 | Describe protocol version 2.0. |
2284 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. | 2292 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. |
2285 | 2293 |
2286 | 2294 |
2287 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss | 2295 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss |
OLD | NEW |