| OLD | NEW |
| 1 # Dart VM Service Protocol 3.1 | 1 # Dart VM Service Protocol 3.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 of _version 3.1_ of the Dart VM Service Protocol. This | 5 This document describes of _version 3.1_ 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 garbage collector, then the _Collected_ [Sentinel](#sentinel) is | 549 garbage collector, then the _Collected_ [Sentinel](#sentinel) is |
| 550 returned. | 550 returned. |
| 551 | 551 |
| 552 If _objectId_ refers to a non-heap object which has been deleted, then | 552 If _objectId_ refers to a non-heap object which has been deleted, then |
| 553 the _Collected_ [Sentinel](#sentinel) is returned. | 553 the _Collected_ [Sentinel](#sentinel) is returned. |
| 554 | 554 |
| 555 If the object handle has not expired and the object has not been | 555 If the object handle has not expired and the object has not been |
| 556 collected, then an [Object](#object) will be returned. | 556 collected, then an [Object](#object) will be returned. |
| 557 | 557 |
| 558 The _offset_ and _count_ parameters are used to request subranges of | 558 The _offset_ and _count_ parameters are used to request subranges of |
| 559 Instance objects with the kinds: List, Map, Uint8ClampedList, | 559 Instance objects with the kinds: String, List, Map, Uint8ClampedList, |
| 560 Uint8List, Uint16List, Uint32List, Uint64List, Int8List, Int16List, | 560 Uint8List, Uint16List, Uint32List, Uint64List, Int8List, Int16List, |
| 561 Int32List, Int64List, Flooat32List, Float64List, Inst32x3List, | 561 Int32List, Int64List, Flooat32List, Float64List, Inst32x3List, |
| 562 Float32x4List, and Float64x2List. These parameters are otherwise | 562 Float32x4List, and Float64x2List. These parameters are otherwise |
| 563 ignored. | 563 ignored. |
| 564 | 564 |
| 565 ### getStack | 565 ### getStack |
| 566 | 566 |
| 567 ``` | 567 ``` |
| 568 Stack getStack(string isolateId) | 568 Stack getStack(string isolateId) |
| 569 ``` | 569 ``` |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 // Int (suitable for passing to int.parse()) | 1464 // Int (suitable for passing to int.parse()) |
| 1465 // String (value may be truncated) | 1465 // String (value may be truncated) |
| 1466 // Float32x4 | 1466 // Float32x4 |
| 1467 // Float64x2 | 1467 // Float64x2 |
| 1468 // Int32x4 | 1468 // Int32x4 |
| 1469 // StackTrace | 1469 // StackTrace |
| 1470 string valueAsString [optional]; | 1470 string valueAsString [optional]; |
| 1471 | 1471 |
| 1472 // The valueAsString for String references may be truncated. If so, | 1472 // The valueAsString for String references may be truncated. If so, |
| 1473 // this property is added with the value 'true'. | 1473 // this property is added with the value 'true'. |
| 1474 // |
| 1475 // New code should use 'length' and 'count' instead. |
| 1474 bool valueAsStringIsTruncated [optional]; | 1476 bool valueAsStringIsTruncated [optional]; |
| 1475 | 1477 |
| 1476 // The length of a List or the number of associations in a Map. | 1478 // The length of a List or the number of associations in a Map or the |
| 1479 // number of codeunits in a String. |
| 1477 // | 1480 // |
| 1478 // Provided for instance kinds: | 1481 // Provided for instance kinds: |
| 1482 // String |
| 1479 // List | 1483 // List |
| 1480 // Map | 1484 // Map |
| 1481 // Uint8ClampedList | 1485 // Uint8ClampedList |
| 1482 // Uint8List | 1486 // Uint8List |
| 1483 // Uint16List | 1487 // Uint16List |
| 1484 // Uint32List | 1488 // Uint32List |
| 1485 // Uint64List | 1489 // Uint64List |
| 1486 // Int8List | 1490 // Int8List |
| 1487 // Int16List | 1491 // Int16List |
| 1488 // Int32List | 1492 // Int32List |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1537 // | 1541 // |
| 1538 // Provided for the instance kinds: | 1542 // Provided for the instance kinds: |
| 1539 // Bool (true or false) | 1543 // Bool (true or false) |
| 1540 // Double (suitable for passing to Double.parse()) | 1544 // Double (suitable for passing to Double.parse()) |
| 1541 // Int (suitable for passing to int.parse()) | 1545 // Int (suitable for passing to int.parse()) |
| 1542 // String (value may be truncated) | 1546 // String (value may be truncated) |
| 1543 string valueAsString [optional]; | 1547 string valueAsString [optional]; |
| 1544 | 1548 |
| 1545 // The valueAsString for String references may be truncated. If so, | 1549 // The valueAsString for String references may be truncated. If so, |
| 1546 // this property is added with the value 'true'. | 1550 // this property is added with the value 'true'. |
| 1551 // |
| 1552 // New code should use 'length' and 'count' instead. |
| 1547 bool valueAsStringIsTruncated [optional]; | 1553 bool valueAsStringIsTruncated [optional]; |
| 1548 | 1554 |
| 1549 // The length of a List or the number of associations in a Map. | 1555 // The length of a List or the number of associations in a Map or the |
| 1556 // number of codeunits in a String. |
| 1550 // | 1557 // |
| 1551 // Provided for instance kinds: | 1558 // Provided for instance kinds: |
| 1559 // String |
| 1552 // List | 1560 // List |
| 1553 // Map | 1561 // Map |
| 1554 // Uint8ClampedList | 1562 // Uint8ClampedList |
| 1555 // Uint8List | 1563 // Uint8List |
| 1556 // Uint16List | 1564 // Uint16List |
| 1557 // Uint32List | 1565 // Uint32List |
| 1558 // Uint64List | 1566 // Uint64List |
| 1559 // Int8List | 1567 // Int8List |
| 1560 // Int16List | 1568 // Int16List |
| 1561 // Int32List | 1569 // Int32List |
| 1562 // Int64List | 1570 // Int64List |
| 1563 // Float32List | 1571 // Float32List |
| 1564 // Float64List | 1572 // Float64List |
| 1565 // Int32x4List | 1573 // Int32x4List |
| 1566 // Float32x4List | 1574 // Float32x4List |
| 1567 // Float64x2List | 1575 // Float64x2List |
| 1568 int length [optional]; | 1576 int length [optional]; |
| 1569 | 1577 |
| 1570 // The index of the first element or association returned. | 1578 // The index of the first element or association or codeunit returned. |
| 1571 // This is only provided when it is non-zero. | 1579 // This is only provided when it is non-zero. |
| 1572 // | 1580 // |
| 1573 // Provided for instance kinds: | 1581 // Provided for instance kinds: |
| 1582 // String |
| 1574 // List | 1583 // List |
| 1575 // Map | 1584 // Map |
| 1576 // Uint8ClampedList | 1585 // Uint8ClampedList |
| 1577 // Uint8List | 1586 // Uint8List |
| 1578 // Uint16List | 1587 // Uint16List |
| 1579 // Uint32List | 1588 // Uint32List |
| 1580 // Uint64List | 1589 // Uint64List |
| 1581 // Int8List | 1590 // Int8List |
| 1582 // Int16List | 1591 // Int16List |
| 1583 // Int32List | 1592 // Int32List |
| 1584 // Int64List | 1593 // Int64List |
| 1585 // Float32List | 1594 // Float32List |
| 1586 // Float64List | 1595 // Float64List |
| 1587 // Int32x4List | 1596 // Int32x4List |
| 1588 // Float32x4List | 1597 // Float32x4List |
| 1589 // Float64x2List | 1598 // Float64x2List |
| 1590 int offset [optional]; | 1599 int offset [optional]; |
| 1591 | 1600 |
| 1592 // The number of elements or associations returned. | 1601 // The number of elements or associations or codeunits returned. |
| 1593 // This is only provided when it is less than length. | 1602 // This is only provided when it is less than length. |
| 1594 // | 1603 // |
| 1595 // Provided for instance kinds: | 1604 // Provided for instance kinds: |
| 1605 // String |
| 1596 // List | 1606 // List |
| 1597 // Map | 1607 // Map |
| 1598 // Uint8ClampedList | 1608 // Uint8ClampedList |
| 1599 // Uint8List | 1609 // Uint8List |
| 1600 // Uint16List | 1610 // Uint16List |
| 1601 // Uint32List | 1611 // Uint32List |
| 1602 // Uint64List | 1612 // Uint64List |
| 1603 // Int8List | 1613 // Int8List |
| 1604 // Int16List | 1614 // Int16List |
| 1605 // Int32List | 1615 // Int32List |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2453 } | 2463 } |
| 2454 ``` | 2464 ``` |
| 2455 | 2465 |
| 2456 ## Revision History | 2466 ## Revision History |
| 2457 | 2467 |
| 2458 version | comments | 2468 version | comments |
| 2459 ------- | -------- | 2469 ------- | -------- |
| 2460 1.0 | initial revision | 2470 1.0 | initial revision |
| 2461 2.0 | Describe protocol version 2.0. | 2471 2.0 | Describe protocol version 2.0. |
| 2462 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. | 2472 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. |
| 2463 3.1 | Add the getSourceReport RPC. | 2473 3.1 | Add the getSourceReport RPC. The getObject RPC now accepts offset and cou
nt for string objects. String objects now contain length, offset, and count pro
perties. |
| 2464 | 2474 |
| 2465 | 2475 |
| 2466 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss | 2476 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss |
| OLD | NEW |