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

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

Issue 1232193003: Provide stdout and stderr output in the Observatory debugger. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: before commit Created 5 years, 5 months 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/service.cc ('k') | runtime/vm/service/vmservice.dart » ('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 1.0 (Draft 1) 1 # Dart VM Service Protocol 1.0 (Draft 1)
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 _draft 1_ of _version 1.0_ of the Dart VM 5 This document describes _draft 1_ of _version 1.0_ of the Dart VM
6 Service Protocol. This protocol is used to communicate with a running 6 Service Protocol. This protocol is used to communicate with a running
7 Dart Virtual Machine. 7 Dart Virtual Machine.
8 8
9 To use the Service Protocol, start the VM with the *--observe* flag. 9 To use the Service Protocol, start the VM with the *--observe* flag.
10 The VM will start a webserver which services protocol requests via WebSocket. 10 The VM will start a webserver which services protocol requests via WebSocket.
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 subscribed) error code is returned. 613 subscribed) error code is returned.
614 614
615 The _streamId_ parameter may have the following published values: 615 The _streamId_ parameter may have the following published values:
616 616
617 streamId | event types provided 617 streamId | event types provided
618 -------- | ----------- 618 -------- | -----------
619 Isolate | IsolateStart, IsolateExit, IsolateUpdate 619 Isolate | IsolateStart, IsolateExit, IsolateUpdate
620 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException , Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect 620 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException , Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect
621 GC | GC 621 GC | GC
622 622
623 Additionally, some embedders provide the _Stdout_ and _Stderr_
624 streams. These streams allow the client to subscribe to writes to
625 stdout and stderr.
626
627 streamId | event types provided
628 -------- | -----------
629 Stdout | WriteEvent
630 Stderr | WriteEvent
631
623 It is considered a _backwards compatible_ change to add a new type of event to a n existing stream. 632 It is considered a _backwards compatible_ change to add a new type of event to a n existing stream.
624 Clients should be written to handle this gracefully, perhaps by warning and igno ring. 633 Clients should be written to handle this gracefully, perhaps by warning and igno ring.
625 634
626 See [Success](#success). 635 See [Success](#success).
627 636
628 ## Public Types 637 ## Public Types
629 638
630 The following is a list of all public types produced by the Service Protocol. 639 The following is a list of all public types produced by the Service Protocol.
631 640
632 We define a small set of primitive types, based on JSON equivalents. 641 We define a small set of primitive types, based on JSON equivalents.
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 // PauseException 994 // PauseException
986 // 995 //
987 // For the Resume event, the top frame is provided at 996 // For the Resume event, the top frame is provided at
988 // all times except for the initial resume event that is delivered 997 // all times except for the initial resume event that is delivered
989 // when an isolate begins execution. 998 // when an isolate begins execution.
990 Frame topFrame [optional]; 999 Frame topFrame [optional];
991 1000
992 // The exception associated with this event, if this is a 1001 // The exception associated with this event, if this is a
993 // PauseException event. 1002 // PauseException event.
994 @Instance exception [optional]; 1003 @Instance exception [optional];
1004
1005 // An array of bytes, encoded as a base64 string.
1006 //
1007 // This is provided for the WriteEvent event.
1008 string bytes [optional];
995 } 1009 }
996 ``` 1010 ```
997 1011
998 An _Event_ is an asynchronous notification from the VM. It is delivered 1012 An _Event_ is an asynchronous notification from the VM. It is delivered
999 only when the client has subscribed to an event stream using the 1013 only when the client has subscribed to an event stream using the
1000 [streamListen](#streamListen) RPC. 1014 [streamListen](#streamListen) RPC.
1001 1015
1002 For more information, see [events](#events). 1016 For more information, see [events](#events).
1003 1017
1004 ### EventKind 1018 ### EventKind
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 // A breakpoint has been added for an isolate. 1051 // A breakpoint has been added for an isolate.
1038 BreakpointAdded, 1052 BreakpointAdded,
1039 1053
1040 // An unresolved breakpoint has been resolved for an isolate. 1054 // An unresolved breakpoint has been resolved for an isolate.
1041 BreakpointResolved, 1055 BreakpointResolved,
1042 1056
1043 // A breakpoint has been removed. 1057 // A breakpoint has been removed.
1044 BreakpointRemoved, 1058 BreakpointRemoved,
1045 1059
1046 // A garbage collection event. 1060 // A garbage collection event.
1047 GC 1061 GC,
1062
1063 // Notification of bytes written, for example, to stdout/stderr.
1064 WriteEvent
1048 } 1065 }
1049 ``` 1066 ```
1050 1067
1051 Adding new values to _EventKind_ is considered a backwards compatible 1068 Adding new values to _EventKind_ is considered a backwards compatible
1052 change. Clients should ignore unrecognized events. 1069 change. Clients should ignore unrecognized events.
1053 1070
1054 ### Field 1071 ### Field
1055 1072
1056 ``` 1073 ```
1057 class @Field extends @Object { 1074 class @Field extends @Object {
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 ``` 1987 ```
1971 1988
1972 ## Revision History 1989 ## Revision History
1973 1990
1974 version | comments 1991 version | comments
1975 ------- | -------- 1992 ------- | --------
1976 1.0 draft 1 | initial revision 1993 1.0 draft 1 | initial revision
1977 1994
1978 1995
1979 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss 1996 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service/vmservice.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698