Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: runtime/vm/service/service.md

Issue 1527793004: Provide list of service protocol extensions in isolate and emit an event when one is registered (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/service_event.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 RPC name of the extension that was added.
1144 //
1145 // This is provided for the ServiceExtensionAdded.
1146 string extensionRPC [optional];
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 11 matching lines...) Expand all
1163 IsolateRunnable, 1168 IsolateRunnable,
1164 1169
1165 // Notification that an isolate has exited. 1170 // Notification that an isolate has exited.
1166 IsolateExit, 1171 IsolateExit,
1167 1172
1168 // Notification that isolate identifying information has changed. 1173 // Notification that isolate identifying information has changed.
1169 // Currently used to notify of changes to the isolate debugging name 1174 // Currently used to notify of changes to the isolate debugging name
1170 // via setName. 1175 // via setName.
1171 IsolateUpdate, 1176 IsolateUpdate,
1172 1177
1178 // Notification that an extension RPC was registered on an isolate.
1179 ServiceExtensionAdded,
1180
1173 // An isolate has paused at start, before executing code. 1181 // An isolate has paused at start, before executing code.
1174 PauseStart, 1182 PauseStart,
1175 1183
1176 // An isolate has paused at exit, before terminating. 1184 // An isolate has paused at exit, before terminating.
1177 PauseExit, 1185 PauseExit,
1178 1186
1179 // An isolate has paused at a breakpoint or due to stepping. 1187 // An isolate has paused at a breakpoint or due to stepping.
1180 PauseBreakpoint, 1188 PauseBreakpoint,
1181 1189
1182 // An isolate has paused due to interruption via pause. 1190 // An isolate has paused due to interruption via pause.
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 @Library[] libraries; 1816 @Library[] libraries;
1809 1817
1810 // A list of all breakpoints for this isolate. 1818 // A list of all breakpoints for this isolate.
1811 Breakpoint[] breakpoints; 1819 Breakpoint[] breakpoints;
1812 1820
1813 // The error that is causing this isolate to exit, if applicable. 1821 // The error that is causing this isolate to exit, if applicable.
1814 Error error [optional]; 1822 Error error [optional];
1815 1823
1816 // The current pause on exception mode for this isolate. 1824 // The current pause on exception mode for this isolate.
1817 ExceptionPauseMode exceptionPauseMode; 1825 ExceptionPauseMode exceptionPauseMode;
1826
1827 // The list of service extension RPCs that are registered for this isolate.
1828 string[] extensionRPCs;
1818 } 1829 }
1819 ``` 1830 ```
1820 1831
1821 An _Isolate_ object provides information about one isolate in the VM. 1832 An _Isolate_ object provides information about one isolate in the VM.
1822 1833
1823 ### Library 1834 ### Library
1824 1835
1825 ``` 1836 ```
1826 class @Library extends @Object { 1837 class @Library extends @Object {
1827 // The name of this library. 1838 // The name of this library.
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 @Isolate[] isolates; 2285 @Isolate[] isolates;
2275 } 2286 }
2276 ``` 2287 ```
2277 2288
2278 ## Revision History 2289 ## Revision History
2279 2290
2280 version | comments 2291 version | comments
2281 ------- | -------- 2292 ------- | --------
2282 1.0 | initial revision 2293 1.0 | initial revision
2283 2.0 | Describe protocol version 2.0. 2294 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. 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.
2285 2296
2286 2297
2287 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss 2298 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/service_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698