| 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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 ``` | 1524 ``` |
| 1525 | 1525 |
| 1526 A _SentinelType_ is used to distinguish different kinds of _Sentinel_ objects. | 1526 A _SentinelType_ is used to distinguish different kinds of _Sentinel_ objects. |
| 1527 | 1527 |
| 1528 ### Script | 1528 ### Script |
| 1529 | 1529 |
| 1530 ``` | 1530 ``` |
| 1531 class @Script extends @Object { | 1531 class @Script extends @Object { |
| 1532 // The uri from which this script was loaded. | 1532 // The uri from which this script was loaded. |
| 1533 string uri; | 1533 string uri; |
| 1534 | |
| 1535 // What kind of script is this? | |
| 1536 string kind; | |
| 1537 } | 1534 } |
| 1538 ``` | 1535 ``` |
| 1539 | 1536 |
| 1540 _@Script_ is a reference to a _Script_. | 1537 _@Script_ is a reference to a _Script_. |
| 1541 | 1538 |
| 1542 ``` | 1539 ``` |
| 1543 class Script extends Object { | 1540 class Script extends Object { |
| 1544 // The uri from which this script was loaded. | 1541 // The uri from which this script was loaded. |
| 1545 string uri; | 1542 string uri; |
| 1546 | 1543 |
| 1547 // What kind of script is this? | |
| 1548 ScriptKind kind; | |
| 1549 | |
| 1550 // The library which owns this script. | 1544 // The library which owns this script. |
| 1551 @Library library; | 1545 @Library library; |
| 1552 | 1546 |
| 1553 // The source code for this script. For certain built-in scripts, | 1547 // The source code for this script. For certain built-in scripts, |
| 1554 // this may be reconstructed without source comments. | 1548 // this may be reconstructed without source comments. |
| 1555 string source; | 1549 string source; |
| 1556 | 1550 |
| 1557 // A table encoding a mapping from token position to line and column. | 1551 // A table encoding a mapping from token position to line and column. |
| 1558 int[][] tokenPosTable; | 1552 int[][] tokenPosTable; |
| 1559 } | 1553 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1571 > [[1, 100, 5, 101, 8],[2, 102, 7]] | 1565 > [[1, 100, 5, 101, 8],[2, 102, 7]] |
| 1572 | 1566 |
| 1573 ...encodes the mapping: | 1567 ...encodes the mapping: |
| 1574 | 1568 |
| 1575 tokenPos | line | column | 1569 tokenPos | line | column |
| 1576 -------- | ---- | ------ | 1570 -------- | ---- | ------ |
| 1577 100 | 1 | 5 | 1571 100 | 1 | 5 |
| 1578 101 | 1 | 8 | 1572 101 | 1 | 8 |
| 1579 102 | 2 | 7 | 1573 102 | 2 | 7 |
| 1580 | 1574 |
| 1581 ### ScriptKind | |
| 1582 | |
| 1583 ``` | |
| 1584 enum ScriptKind { | |
| 1585 script, | |
| 1586 library, | |
| 1587 source, | |
| 1588 patch | |
| 1589 } | |
| 1590 ``` | |
| 1591 | |
| 1592 A _ScriptKind_ is used to classify a _Script_. | |
| 1593 | |
| 1594 TODO: We need to explain what this is about or find a way to hide it. | |
| 1595 | |
| 1596 ### Stack | 1575 ### Stack |
| 1597 | 1576 |
| 1598 ``` | 1577 ``` |
| 1599 class Stack { | 1578 class Stack { |
| 1600 Frame[] frames; | 1579 Frame[] frames; |
| 1601 Message[] messages; | 1580 Message[] messages; |
| 1602 } | 1581 } |
| 1603 ``` | 1582 ``` |
| 1604 | 1583 |
| 1605 ### StepOption | 1584 ### StepOption |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 // A list of isolates running in the VM. | 1750 // A list of isolates running in the VM. |
| 1772 @Isolate[] isolates | 1751 @Isolate[] isolates |
| 1773 } | 1752 } |
| 1774 ``` | 1753 ``` |
| 1775 | 1754 |
| 1776 ## Revision History | 1755 ## Revision History |
| 1777 | 1756 |
| 1778 version | comments | 1757 version | comments |
| 1779 ------- | -------- | 1758 ------- | -------- |
| 1780 0.0 | draft | 1759 0.0 | draft |
| OLD | NEW |