| OLD | NEW |
| 1 # Dart VM Service Protocol 0.0 | 1 # Dart VM Service Protocol 0.0 |
| 2 | 2 |
| 3 This document describes _version 0.0_ of the Dart VM Service Protocol. | 3 This document describes _version 0.0_ of the Dart VM Service Protocol. |
| 4 This protocol is used to communicate with a running Dart Virtual | 4 This protocol is used to communicate with a running Dart Virtual |
| 5 Machine. | 5 Machine. |
| 6 | 6 |
| 7 To use the Service Protocol, start the VM with the *--observe* flag. | 7 To use the Service Protocol, start the VM with the *--observe* flag. |
| 8 The VM will start a webserver which services protocol requests via WebSocket. | 8 The VM will start a webserver which services protocol requests via WebSocket. |
| 9 It is possible to make HTTP (non-WebSocket) requests, | 9 It is possible to make HTTP (non-WebSocket) requests, |
| 10 but this does not allow access to VM _events_ and is not documented | 10 but this does not allow access to VM _events_ and is not documented |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 - [Isolate](#isolate) | 61 - [Isolate](#isolate) |
| 62 - [Library](#library) | 62 - [Library](#library) |
| 63 - [LibraryDependency](#librarydependency) | 63 - [LibraryDependency](#librarydependency) |
| 64 - [ListElement](#listelement) | 64 - [ListElement](#listelement) |
| 65 - [Message](#message) | 65 - [Message](#message) |
| 66 - [Null](#null) | 66 - [Null](#null) |
| 67 - [Object](#object) | 67 - [Object](#object) |
| 68 - [Sentinel](#sentinel) | 68 - [Sentinel](#sentinel) |
| 69 - [SentinelKind](#sentinelkind) | 69 - [SentinelKind](#sentinelkind) |
| 70 - [Script](#script) | 70 - [Script](#script) |
| 71 - [SourceLocation](#sourcelocation) |
| 71 - [Stack](#stack) | 72 - [Stack](#stack) |
| 72 - [StepOption](#stepoption) | 73 - [StepOption](#stepoption) |
| 73 - [Success](#success) | 74 - [Success](#success) |
| 74 - [TypeArguments](#typearguments) | 75 - [TypeArguments](#typearguments) |
| 75 - [Response](#response) | 76 - [Response](#response) |
| 76 - [Version](#version) | 77 - [Version](#version) |
| 77 - [VM](#vm) | 78 - [VM](#vm) |
| 78 - [Revision History](#revision-history) | 79 - [Revision History](#revision-history) |
| 79 | 80 |
| 80 ## RPCs, Requests, and Responses | 81 ## RPCs, Requests, and Responses |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 | 734 |
| 734 If the variable has been optimized out by the compiler, the _value_ | 735 If the variable has been optimized out by the compiler, the _value_ |
| 735 will be the _OptimizedOut_ [Sentinel](#sentinel). | 736 will be the _OptimizedOut_ [Sentinel](#sentinel). |
| 736 | 737 |
| 737 ### Breakpoint | 738 ### Breakpoint |
| 738 | 739 |
| 739 ``` | 740 ``` |
| 740 class Breakpoint extends Response { | 741 class Breakpoint extends Response { |
| 741 int breakpointNumber; | 742 int breakpointNumber; |
| 742 bool resolved; | 743 bool resolved; |
| 743 @Script script; | 744 SourceLocation location; |
| 744 int tokenPos; | |
| 745 } | 745 } |
| 746 ``` | 746 ``` |
| 747 | 747 |
| 748 A _Breakpoint_ describes a debugger breakpoint. | 748 A _Breakpoint_ describes a debugger breakpoint. |
| 749 | 749 |
| 750 ### Class | 750 ### Class |
| 751 | 751 |
| 752 ``` | 752 ``` |
| 753 class @Class extends @Object { | 753 class @Class extends @Object { |
| 754 // The name of this class. | 754 // The name of this class. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 777 | 777 |
| 778 // Is this class implemented? | 778 // Is this class implemented? |
| 779 bool implemented; | 779 bool implemented; |
| 780 | 780 |
| 781 // Is this a vm patch class? | 781 // Is this a vm patch class? |
| 782 bool patch; | 782 bool patch; |
| 783 | 783 |
| 784 // The library which contains this class. | 784 // The library which contains this class. |
| 785 @Library library; | 785 @Library library; |
| 786 | 786 |
| 787 // The script which defines this class. May be missing for some | 787 // The location of this class in the source code. |
| 788 // classes. | 788 SourceLocation location [optional]; |
| 789 @Script script; | |
| 790 | 789 |
| 791 // The superclass of this class, if any. | 790 // The superclass of this class, if any. |
| 792 @Class super [optional]; | 791 @Class super [optional]; |
| 793 | 792 |
| 794 // A list of interface types for this class. | 793 // A list of interface types for this class. |
| 795 @Type[] interfaces; | 794 @Type[] interfaces; |
| 796 | 795 |
| 797 // A list of fields in this class. Does not include fields from | 796 // A list of fields in this class. Does not include fields from |
| 798 // superclasses. | 797 // superclasses. |
| 799 @Field[] fields; | 798 @Field[] fields; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 | 1046 |
| 1048 // Is this field final? | 1047 // Is this field final? |
| 1049 bool final; | 1048 bool final; |
| 1050 | 1049 |
| 1051 // Is this field static? | 1050 // Is this field static? |
| 1052 bool static; | 1051 bool static; |
| 1053 | 1052 |
| 1054 // The value of this field, if the field is static. | 1053 // The value of this field, if the field is static. |
| 1055 @Instance staticValue [optional]; | 1054 @Instance staticValue [optional]; |
| 1056 | 1055 |
| 1057 // The script containing this feild. | 1056 // The location of this field in the source code. |
| 1058 @Script script [optional]; | 1057 SourceLocation location [optional]; |
| 1059 | |
| 1060 // The token position of this field. | |
| 1061 int tokenPos [optional]; | |
| 1062 } | 1058 } |
| 1063 ``` | 1059 ``` |
| 1064 | 1060 |
| 1065 A _Field_ provides information about a Dart language field or | 1061 A _Field_ provides information about a Dart language field or |
| 1066 variable. | 1062 variable. |
| 1067 | 1063 |
| 1068 | 1064 |
| 1069 ### Flag | 1065 ### Flag |
| 1070 | 1066 |
| 1071 ``` | 1067 ``` |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1095 // A list of all flags which have been modified by the user. | 1091 // A list of all flags which have been modified by the user. |
| 1096 modifiedFlags []Flag | 1092 modifiedFlags []Flag |
| 1097 } | 1093 } |
| 1098 ``` | 1094 ``` |
| 1099 | 1095 |
| 1100 A _FlagList_ represents the complete set of VM command line flags. | 1096 A _FlagList_ represents the complete set of VM command line flags. |
| 1101 | 1097 |
| 1102 ### Frame | 1098 ### Frame |
| 1103 | 1099 |
| 1104 ``` | 1100 ``` |
| 1105 class Frame { | 1101 class Frame extends Response { |
| 1106 int index; | 1102 int index; |
| 1107 @Function function; | 1103 @Function function; |
| 1108 @Code code; | 1104 @Code code; |
| 1109 @Script script; | 1105 @Script script; |
| 1110 int tokenPos; | 1106 int tokenPos; |
| 1111 BoundVariable[] vars; | 1107 BoundVariable[] vars; |
| 1112 } | 1108 } |
| 1113 ``` | 1109 ``` |
| 1114 | 1110 |
| 1115 ### Function | 1111 ### Function |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1138 ``` | 1134 ``` |
| 1139 // A Dart language function. | 1135 // A Dart language function. |
| 1140 class Function extends Object { | 1136 class Function extends Object { |
| 1141 // The name of this function. | 1137 // The name of this function. |
| 1142 string name; | 1138 string name; |
| 1143 | 1139 |
| 1144 // The owner of this field, which can be a Library, Class, or a | 1140 // The owner of this field, which can be a Library, Class, or a |
| 1145 // Function. | 1141 // Function. |
| 1146 @Library|@Class|@Function owner; | 1142 @Library|@Class|@Function owner; |
| 1147 | 1143 |
| 1148 // The script containing this function. | 1144 // The location of this function in the source code. |
| 1149 @Script script [optional]; | 1145 SourceLocation location [optional]; |
| 1150 | |
| 1151 // The first token position of this function. | |
| 1152 int tokenPos [optional]; | |
| 1153 | |
| 1154 // The last token position of this function. | |
| 1155 int endTokenPos [optional]; | |
| 1156 | 1146 |
| 1157 // The compiled code associated with this function. | 1147 // The compiled code associated with this function. |
| 1158 @Code code [optional]; | 1148 @Code code [optional]; |
| 1159 } | 1149 } |
| 1160 ``` | 1150 ``` |
| 1161 | 1151 |
| 1162 A _Function_ represents a Dart language function. | 1152 A _Function_ represents a Dart language function. |
| 1163 | 1153 |
| 1164 ### Instance | 1154 ### Instance |
| 1165 | 1155 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 ``` | 1532 ``` |
| 1543 class MapAssociation { | 1533 class MapAssociation { |
| 1544 @Instance|Sentinel key; | 1534 @Instance|Sentinel key; |
| 1545 @Instance|Sentinel value; | 1535 @Instance|Sentinel value; |
| 1546 } | 1536 } |
| 1547 ``` | 1537 ``` |
| 1548 | 1538 |
| 1549 ### Message | 1539 ### Message |
| 1550 | 1540 |
| 1551 ``` | 1541 ``` |
| 1552 class Message { | 1542 class Message extends Response { |
| 1553 int index; | 1543 int index; |
| 1554 string name; | 1544 string name; |
| 1555 string messageObjectId; | 1545 string messageObjectId; |
| 1556 int size; | 1546 int size; |
| 1557 @Function handlerFunction [optional]; | 1547 @Function handler [optional]; |
| 1558 @Script handleScript [optional]; | 1548 SourceLocation location [optional]; |
| 1559 int handlerTokenPos [optional]; | |
| 1560 } | 1549 } |
| 1561 ``` | 1550 ``` |
| 1562 | 1551 |
| 1563 ### Null | 1552 ### Null |
| 1564 | 1553 |
| 1565 ``` | 1554 ``` |
| 1566 class @Null extends @Instance { | 1555 class @Null extends @Instance { |
| 1567 // Always 'null'. | 1556 // Always 'null'. |
| 1568 string valueAsString; | 1557 string valueAsString; |
| 1569 } | 1558 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 > [[1, 100, 5, 101, 8],[2, 102, 7]] | 1687 > [[1, 100, 5, 101, 8],[2, 102, 7]] |
| 1699 | 1688 |
| 1700 ...encodes the mapping: | 1689 ...encodes the mapping: |
| 1701 | 1690 |
| 1702 tokenPos | line | column | 1691 tokenPos | line | column |
| 1703 -------- | ---- | ------ | 1692 -------- | ---- | ------ |
| 1704 100 | 1 | 5 | 1693 100 | 1 | 5 |
| 1705 101 | 1 | 8 | 1694 101 | 1 | 8 |
| 1706 102 | 2 | 7 | 1695 102 | 2 | 7 |
| 1707 | 1696 |
| 1697 ### SourceLocation |
| 1698 |
| 1699 ``` |
| 1700 class SourceLocation extends Response { |
| 1701 // The script contaiinging the source location. |
| 1702 @Script script; |
| 1703 |
| 1704 // The first token of the location. |
| 1705 int tokenPos; |
| 1706 |
| 1707 // The last token of the location if this is a range. |
| 1708 int endTokenPos [optional]; |
| 1709 } |
| 1710 ``` |
| 1711 |
| 1712 The _SourceLocation_ class is used to designate a position or range in |
| 1713 some script. |
| 1714 |
| 1708 ### Stack | 1715 ### Stack |
| 1709 | 1716 |
| 1710 ``` | 1717 ``` |
| 1711 class Stack { | 1718 class Stack { |
| 1712 Frame[] frames; | 1719 Frame[] frames; |
| 1713 Message[] messages; | 1720 Message[] messages; |
| 1714 } | 1721 } |
| 1715 ``` | 1722 ``` |
| 1716 | 1723 |
| 1717 ### StepOption | 1724 ### StepOption |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1817 // A list of isolates running in the VM. | 1824 // A list of isolates running in the VM. |
| 1818 @Isolate[] isolates | 1825 @Isolate[] isolates |
| 1819 } | 1826 } |
| 1820 ``` | 1827 ``` |
| 1821 | 1828 |
| 1822 ## Revision History | 1829 ## Revision History |
| 1823 | 1830 |
| 1824 version | comments | 1831 version | comments |
| 1825 ------- | -------- | 1832 ------- | -------- |
| 1826 0.0 | draft | 1833 0.0 | draft |
| OLD | NEW |