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 20 matching lines...) Expand all Loading... |
31 - [evaluateInFrame](#evaluateinframe) | 31 - [evaluateInFrame](#evaluateinframe) |
32 - [getFlagList](#getflaglist) | 32 - [getFlagList](#getflaglist) |
33 - [getIsolate](#getisolate) | 33 - [getIsolate](#getisolate) |
34 - [getObject](#getobject) | 34 - [getObject](#getobject) |
35 - [getStack](#getstack) | 35 - [getStack](#getstack) |
36 - [getVersion](#getversion) | 36 - [getVersion](#getversion) |
37 - [getVM](#getvm) | 37 - [getVM](#getvm) |
38 - [pause](#pause) | 38 - [pause](#pause) |
39 - [removeBreakpoint](#removebreakpoint) | 39 - [removeBreakpoint](#removebreakpoint) |
40 - [resume](#resume) | 40 - [resume](#resume) |
| 41 - [setLibraryDebuggable](#setlibrarydebuggable) |
41 - [setName](#setname) | 42 - [setName](#setname) |
42 » - [setLibraryDebuggable](#setlibrarydebuggable) | 43 » - [setVMName](#setvmname) |
43 - [streamCancel](#streamcancel) | 44 - [streamCancel](#streamcancel) |
44 - [streamListen](#streamlisten) | 45 - [streamListen](#streamlisten) |
45 - [Public Types](#public-types) | 46 - [Public Types](#public-types) |
46 - [BoundField](#boundfield) | 47 - [BoundField](#boundfield) |
47 - [BoundVariable](#boundvariable) | 48 - [BoundVariable](#boundvariable) |
48 - [Breakpoint](#breakpoint) | 49 - [Breakpoint](#breakpoint) |
49 - [Class](#class) | 50 - [Class](#class) |
50 - [ClassList](#classlist) | 51 - [ClassList](#classlist) |
51 - [Code](#code) | 52 - [Code](#code) |
52 - [CodeKind](#codekind) | 53 - [CodeKind](#codekind) |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 single-stepping to use. | 617 single-stepping to use. |
617 | 618 |
618 step | meaning | 619 step | meaning |
619 ---- | ------- | 620 ---- | ------- |
620 Into | Single step, entering function calls | 621 Into | Single step, entering function calls |
621 Over | Single step, skipping over function calls | 622 Over | Single step, skipping over function calls |
622 Out | Single step until the current function exits | 623 Out | Single step until the current function exits |
623 | 624 |
624 See [Success](#success), [StepOption](#StepOption). | 625 See [Success](#success), [StepOption](#StepOption). |
625 | 626 |
| 627 ### setLibraryDebuggable |
| 628 |
| 629 ``` |
| 630 Success setLibraryDebuggable(string isolateId, |
| 631 string libraryId, |
| 632 bool isDebuggable) |
| 633 ``` |
| 634 |
| 635 The _setLibraryDebuggable_ RPC is used to enable or disable whether |
| 636 breakpoints and stepping work for a given library. |
| 637 |
| 638 See [Success](#success). |
| 639 |
626 ### setName | 640 ### setName |
627 | 641 |
628 ``` | 642 ``` |
629 Success setName(string isolateId, | 643 Success setName(string isolateId, |
630 string name) | 644 string name) |
631 ``` | 645 ``` |
632 | 646 |
633 The _setName_ RPC is used to change the debugging name for an isolate. | 647 The _setName_ RPC is used to change the debugging name for an isolate. |
634 | 648 |
635 See [Success](#success). | 649 See [Success](#success). |
636 | 650 |
637 ### setLibraryDebuggable | 651 ### setVMName |
638 | 652 |
639 ``` | 653 ``` |
640 Success setLibraryDebuggable(string isolateId, | 654 Success setVMName(string name) |
641 string libraryId, | |
642 bool isDebuggable) | |
643 ``` | 655 ``` |
644 | 656 |
645 The _setLibraryDebuggable_ RPC is used to enable or disable whether | 657 The _setVMName_ RPC is used to change the debugging name for the vm. |
646 breakpoints and stepping work for a given library. | |
647 | 658 |
648 See [Success](#success). | 659 See [Success](#success). |
649 | 660 |
650 ### streamCancel | 661 ### streamCancel |
651 | 662 |
652 ``` | 663 ``` |
653 Success streamCancel(string streamId) | 664 Success streamCancel(string streamId) |
654 ``` | 665 ``` |
655 | 666 |
656 The _streamCancel_ RPC cancels a stream subscription in the VM. | 667 The _streamCancel_ RPC cancels a stream subscription in the VM. |
(...skipping 12 matching lines...) Expand all Loading... |
669 The _streamListen_ RPC subscribes to a stream in the VM. Once | 680 The _streamListen_ RPC subscribes to a stream in the VM. Once |
670 subscribed, the client will begin receiving events from the stream. | 681 subscribed, the client will begin receiving events from the stream. |
671 | 682 |
672 If the client is not subscribed to the stream, the _103_ (Stream already | 683 If the client is not subscribed to the stream, the _103_ (Stream already |
673 subscribed) error code is returned. | 684 subscribed) error code is returned. |
674 | 685 |
675 The _streamId_ parameter may have the following published values: | 686 The _streamId_ parameter may have the following published values: |
676 | 687 |
677 streamId | event types provided | 688 streamId | event types provided |
678 -------- | ----------- | 689 -------- | ----------- |
| 690 VM | VMUpdate |
679 Isolate | IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate | 691 Isolate | IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate |
680 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException
, Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect | 692 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException
, Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect |
681 GC | GC | 693 GC | GC |
682 | 694 |
683 Additionally, some embedders provide the _Stdout_ and _Stderr_ | 695 Additionally, some embedders provide the _Stdout_ and _Stderr_ |
684 streams. These streams allow the client to subscribe to writes to | 696 streams. These streams allow the client to subscribe to writes to |
685 stdout and stderr. | 697 stdout and stderr. |
686 | 698 |
687 streamId | event types provided | 699 streamId | event types provided |
688 -------- | ----------- | 700 -------- | ----------- |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 ``` | 1032 ``` |
1021 | 1033 |
1022 ### Event | 1034 ### Event |
1023 | 1035 |
1024 ``` | 1036 ``` |
1025 class Event extends Response { | 1037 class Event extends Response { |
1026 // What kind of event is this? | 1038 // What kind of event is this? |
1027 EventKind kind; | 1039 EventKind kind; |
1028 | 1040 |
1029 // The isolate with which this event is associated. | 1041 // The isolate with which this event is associated. |
1030 @Isolate isolate; | 1042 // |
| 1043 // This is provided for all event kinds except for: |
| 1044 // VMUpdate |
| 1045 @Isolate isolate [optional]; |
| 1046 |
| 1047 // The vm with which this event is associated. |
| 1048 // |
| 1049 // This is provided for the event kind: |
| 1050 // VMUpdate |
| 1051 @VM vm [optional]; |
1031 | 1052 |
1032 // The timestamp (in milliseconds since the epoch) associated with this event. | 1053 // The timestamp (in milliseconds since the epoch) associated with this event. |
1033 // For some isolate pause events, the timestamp is from when the isolate was | 1054 // For some isolate pause events, the timestamp is from when the isolate was |
1034 // paused. For other events, the timestamp is from when the event was created. | 1055 // paused. For other events, the timestamp is from when the event was created. |
1035 int timestamp; | 1056 int timestamp; |
1036 | 1057 |
1037 // The breakpoint which was added, removed, or resolved. | 1058 // The breakpoint which was added, removed, or resolved. |
1038 // | 1059 // |
1039 // This is provided for the event kinds: | 1060 // This is provided for the event kinds: |
1040 // PauseBreakpoint | 1061 // PauseBreakpoint |
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2140 @Isolate[] isolates; | 2161 @Isolate[] isolates; |
2141 } | 2162 } |
2142 ``` | 2163 ``` |
2143 | 2164 |
2144 ## Revision History | 2165 ## Revision History |
2145 | 2166 |
2146 version | comments | 2167 version | comments |
2147 ------- | -------- | 2168 ------- | -------- |
2148 1.0 | initial revision | 2169 1.0 | initial revision |
2149 2.0 | Describe protocol version 2.0. | 2170 2.0 | Describe protocol version 2.0. |
2150 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. | 2171 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
. |
2151 | 2172 |
2152 | 2173 |
2153 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss | 2174 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss |
OLD | NEW |