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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 - [ClassList](#classlist) | 49 - [ClassList](#classlist) |
50 - [Code](#code) | 50 - [Code](#code) |
51 - [CodeKind](#codekind) | 51 - [CodeKind](#codekind) |
52 - [Double](#double) | 52 - [Double](#double) |
53 - [Error](#error) | 53 - [Error](#error) |
54 - [Event](#event) | 54 - [Event](#event) |
55 - [EventType](#eventtype) | 55 - [EventType](#eventtype) |
56 - [Field](#field) | 56 - [Field](#field) |
57 - [Flag](#flag) | 57 - [Flag](#flag) |
58 - [FlagList](#flaglist) | 58 - [FlagList](#flaglist) |
59 - [FlagType](#flagtype) | |
60 - [Frame](#frame) | 59 - [Frame](#frame) |
61 - [Function](#function) | 60 - [Function](#function) |
62 - [Instance](#instance) | 61 - [Instance](#instance) |
63 - [Int](#int) | 62 - [Int](#int) |
64 - [Isolate](#isolate) | 63 - [Isolate](#isolate) |
65 - [Library](#library) | 64 - [Library](#library) |
66 - [List](#list) | 65 - [List](#list) |
67 - [ListElement](#listelement) | 66 - [ListElement](#listelement) |
68 - [Message](#message) | 67 - [Message](#message) |
69 - [Null](#null) | 68 - [Null](#null) |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 The _resume_ RPC is used to resume execution of a paused isolate. | 539 The _resume_ RPC is used to resume execution of a paused isolate. |
541 | 540 |
542 If the _step_ parameter is not provided, the program will resume | 541 If the _step_ parameter is not provided, the program will resume |
543 regular execution. | 542 regular execution. |
544 | 543 |
545 If the _step_ parameter is provided, it indicates what form of | 544 If the _step_ parameter is provided, it indicates what form of |
546 single-stepping to use. | 545 single-stepping to use. |
547 | 546 |
548 step | meaning | 547 step | meaning |
549 ---- | ------- | 548 ---- | ------- |
550 into | Single step, entering function calls | 549 Into | Single step, entering function calls |
551 over | Single step, skipping over function calls | 550 Over | Single step, skipping over function calls |
552 out | Single step until the current function exits | 551 Out | Single step until the current function exits |
553 | 552 |
554 See [Success](#success), [StepOption](#StepOption). | 553 See [Success](#success), [StepOption](#StepOption). |
555 | 554 |
556 ### setName | 555 ### setName |
557 | 556 |
558 ``` | 557 ``` |
559 Success setName(string isolateId, | 558 Success setName(string isolateId, |
560 string name) | 559 string name) |
561 ``` | 560 ``` |
562 | 561 |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 ### Flag | 1073 ### Flag |
1075 | 1074 |
1076 ``` | 1075 ``` |
1077 class Flag { | 1076 class Flag { |
1078 // The name of the flag. | 1077 // The name of the flag. |
1079 string name; | 1078 string name; |
1080 | 1079 |
1081 // A description of the flag. | 1080 // A description of the flag. |
1082 string comment; | 1081 string comment; |
1083 | 1082 |
1084 // The type of the flag. | |
1085 FlagType flagType; | |
1086 | |
1087 // The value of this flag as a string. | 1083 // The value of this flag as a string. |
1088 // | 1084 // |
1089 // If this property is absent, then the value of the flag was NULL. | 1085 // If this property is absent, then the value of the flag was NULL. |
1090 string valueAsString [optional]; | 1086 string valueAsString [optional]; |
1091 } | 1087 } |
1092 ``` | 1088 ``` |
1093 | 1089 |
1094 A _Flag_ represents a single VM command line flag. | 1090 A _Flag_ represents a single VM command line flag. |
1095 | 1091 |
1096 ### FlagList | 1092 ### FlagList |
1097 | 1093 |
1098 ``` | 1094 ``` |
1099 class FlagList extends Response { | 1095 class FlagList extends Response { |
1100 // A list of all flags which are set to default values. | 1096 // A list of all flags which are set to default values. |
1101 unmodifiedFlags []Flag | 1097 unmodifiedFlags []Flag |
1102 | 1098 |
1103 // A list of all flags which have been modified by the user. | 1099 // A list of all flags which have been modified by the user. |
1104 modifiedFlags []Flag | 1100 modifiedFlags []Flag |
1105 } | 1101 } |
1106 ``` | 1102 ``` |
1107 | 1103 |
1108 A _FlagList_ represents the complete set of VM command line flags. | 1104 A _FlagList_ represents the complete set of VM command line flags. |
1109 | 1105 |
1110 ### FlagType | |
1111 | |
1112 ``` | |
1113 enum FlagType { | |
1114 bool, | |
1115 int, | |
1116 uint64_t, | |
1117 string | |
1118 } | |
1119 ``` | |
1120 | |
1121 A _FlagType_ indicates the type of a VM command line flag. | |
1122 | |
1123 ### Frame | 1106 ### Frame |
1124 | 1107 |
1125 ``` | 1108 ``` |
1126 class Frame { | 1109 class Frame { |
1127 int index; | 1110 int index; |
1128 @Function function; | 1111 @Function function; |
1129 @Code code; | 1112 @Code code; |
1130 @Script script; | 1113 @Script script; |
1131 int tokenPos; | 1114 int tokenPos; |
1132 BoundVariable[] vars; | 1115 BoundVariable[] vars; |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 class Stack { | 1504 class Stack { |
1522 Frame[] frames; | 1505 Frame[] frames; |
1523 Message[] messages; | 1506 Message[] messages; |
1524 } | 1507 } |
1525 ``` | 1508 ``` |
1526 | 1509 |
1527 ### StepOption | 1510 ### StepOption |
1528 | 1511 |
1529 ``` | 1512 ``` |
1530 enum StepOption { | 1513 enum StepOption { |
1531 into, | 1514 Into, |
1532 over, | 1515 Over, |
1533 out | 1516 Out |
1534 } | 1517 } |
1535 ``` | 1518 ``` |
1536 | 1519 |
1537 A _StepOption_ indicates which form of stepping is requested in a [resume](#resu
me) RPC. | 1520 A _StepOption_ indicates which form of stepping is requested in a [resume](#resu
me) RPC. |
1538 | 1521 |
1539 ### String | 1522 ### String |
1540 | 1523 |
1541 ``` | 1524 ``` |
1542 class @String extends @Instance { | 1525 class @String extends @Instance { |
1543 // The value of this double as a string. | 1526 // The value of this double as a string. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 // A list of isolates running in the VM. | 1676 // A list of isolates running in the VM. |
1694 @Isolate[] isolates | 1677 @Isolate[] isolates |
1695 } | 1678 } |
1696 ``` | 1679 ``` |
1697 | 1680 |
1698 ## Revision History | 1681 ## Revision History |
1699 | 1682 |
1700 version | comments | 1683 version | comments |
1701 ------- | -------- | 1684 ------- | -------- |
1702 0.0 | draft | 1685 0.0 | draft |
OLD | NEW |