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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 | 519 |
520 If _isolateId_ refers to an isolate which has exited, then the | 520 If _isolateId_ refers to an isolate which has exited, then the |
521 _Collected_ [Sentinel](#sentinel) is returned. | 521 _Collected_ [Sentinel](#sentinel) is returned. |
522 | 522 |
523 See [Isolate](#isolate). | 523 See [Isolate](#isolate). |
524 | 524 |
525 ### getObject | 525 ### getObject |
526 | 526 |
527 ``` | 527 ``` |
528 Object|Sentinel getObject(string isolateId, | 528 Object|Sentinel getObject(string isolateId, |
529 string objectId) | 529 string objectId, |
| 530 int offset [optional]) |
| 531 int count [optional]) |
530 ``` | 532 ``` |
531 | 533 |
532 The _getObject_ RPC is used to lookup an _object_ from some isolate by | 534 The _getObject_ RPC is used to lookup an _object_ from some isolate by |
533 its _id_. | 535 its _id_. |
534 | 536 |
535 If _objectId_ is a temporary id which has expired, then then _Expired_ | 537 If _objectId_ is a temporary id which has expired, then then _Expired_ |
536 [Sentinel](#sentinel) is returned. | 538 [Sentinel](#sentinel) is returned. |
537 | 539 |
538 If _objectId_ refers to a heap object which has been collected by the VM's | 540 If _objectId_ refers to a heap object which has been collected by the VM's |
539 garbage collector, then the _Collected_ [Sentinel](#sentinel) is | 541 garbage collector, then the _Collected_ [Sentinel](#sentinel) is |
540 returned. | 542 returned. |
541 | 543 |
542 If _objectId_ refers to a non-heap object which has been deleted, then | 544 If _objectId_ refers to a non-heap object which has been deleted, then |
543 the _Collected_ [Sentinel](#sentinel) is returned. | 545 the _Collected_ [Sentinel](#sentinel) is returned. |
544 | 546 |
545 If the object handle has not expired and the object has not been | 547 If the object handle has not expired and the object has not been |
546 collected, then an [Object](#object) will be returned. | 548 collected, then an [Object](#object) will be returned. |
547 | 549 |
| 550 The _offset_ and _count_ parameters are used to request subranges of |
| 551 Instance objects with the kinds: List, Map, Uint8ClampedList, |
| 552 Uint8List, Uint16List, Uint32List, Uint64List, Int8List, Int16List, |
| 553 Int32List, Int64List, Flooat32List, Float64List, Inst32x3List, |
| 554 Float32x4List, and Float64x2List. These parameters are otherwise |
| 555 ignored. |
| 556 |
548 ### getStack | 557 ### getStack |
549 | 558 |
550 ``` | 559 ``` |
551 Stack getStack(string isolateId) | 560 Stack getStack(string isolateId) |
552 ``` | 561 ``` |
553 | 562 |
554 The _getStack_ RPC is used to retrieve the current execution stack and | 563 The _getStack_ RPC is used to retrieve the current execution stack and |
555 message queue for an isolate. The isolate does not need to be paused. | 564 message queue for an isolate. The isolate does not need to be paused. |
556 | 565 |
557 See [Stack](#stack). | 566 See [Stack](#stack). |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1338 // Float32x4 | 1347 // Float32x4 |
1339 // Float64x2 | 1348 // Float64x2 |
1340 // Int32x4 | 1349 // Int32x4 |
1341 // StackTrace | 1350 // StackTrace |
1342 string valueAsString [optional]; | 1351 string valueAsString [optional]; |
1343 | 1352 |
1344 // The valueAsString for String references may be truncated. If so, | 1353 // The valueAsString for String references may be truncated. If so, |
1345 // this property is added with the value 'true'. | 1354 // this property is added with the value 'true'. |
1346 bool valueAsStringIsTruncated [optional]; | 1355 bool valueAsStringIsTruncated [optional]; |
1347 | 1356 |
1348 // The length of a List instance. | 1357 // The length of a List or the number of associations in a Map. |
1349 // | 1358 // |
1350 // Provided for instance kinds: | 1359 // Provided for instance kinds: |
1351 // List | 1360 // List |
1352 // Map | 1361 // Map |
1353 // Uint8ClampedList | 1362 // Uint8ClampedList |
1354 // Uint8List | 1363 // Uint8List |
1355 // Uint16List | 1364 // Uint16List |
1356 // Uint32List | 1365 // Uint32List |
1357 // Uint64List | 1366 // Uint64List |
1358 // Int8List | 1367 // Int8List |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 // Bool (true or false) | 1420 // Bool (true or false) |
1412 // Double (suitable for passing to Double.parse()) | 1421 // Double (suitable for passing to Double.parse()) |
1413 // Int (suitable for passing to int.parse()) | 1422 // Int (suitable for passing to int.parse()) |
1414 // String (value may be truncated) | 1423 // String (value may be truncated) |
1415 string valueAsString [optional]; | 1424 string valueAsString [optional]; |
1416 | 1425 |
1417 // The valueAsString for String references may be truncated. If so, | 1426 // The valueAsString for String references may be truncated. If so, |
1418 // this property is added with the value 'true'. | 1427 // this property is added with the value 'true'. |
1419 bool valueAsStringIsTruncated [optional]; | 1428 bool valueAsStringIsTruncated [optional]; |
1420 | 1429 |
1421 // The length of a List instance. | 1430 // The length of a List or the number of associations in a Map. |
1422 // | 1431 // |
1423 // Provided for instance kinds: | 1432 // Provided for instance kinds: |
1424 // List | 1433 // List |
1425 // Map | 1434 // Map |
1426 // Uint8ClampedList | 1435 // Uint8ClampedList |
1427 // Uint8List | 1436 // Uint8List |
1428 // Uint16List | 1437 // Uint16List |
1429 // Uint32List | 1438 // Uint32List |
1430 // Uint64List | 1439 // Uint64List |
1431 // Int8List | 1440 // Int8List |
1432 // Int16List | 1441 // Int16List |
1433 // Int32List | 1442 // Int32List |
1434 // Int64List | 1443 // Int64List |
1435 // Float32List | 1444 // Float32List |
1436 // Float64List | 1445 // Float64List |
1437 // Int32x4List | 1446 // Int32x4List |
1438 // Float32x4List | 1447 // Float32x4List |
1439 // Float64x2List | 1448 // Float64x2List |
1440 int length [optional]; | 1449 int length [optional]; |
1441 | 1450 |
| 1451 // The index of the first element or association returned. |
| 1452 // This is only provided when it is non-zero. |
| 1453 // |
| 1454 // Provided for instance kinds: |
| 1455 // List |
| 1456 // Map |
| 1457 // Uint8ClampedList |
| 1458 // Uint8List |
| 1459 // Uint16List |
| 1460 // Uint32List |
| 1461 // Uint64List |
| 1462 // Int8List |
| 1463 // Int16List |
| 1464 // Int32List |
| 1465 // Int64List |
| 1466 // Float32List |
| 1467 // Float64List |
| 1468 // Int32x4List |
| 1469 // Float32x4List |
| 1470 // Float64x2List |
| 1471 int offset [optional]; |
| 1472 |
| 1473 // The number of elements or associations returned. |
| 1474 // This is only provided when it is less than length. |
| 1475 // |
| 1476 // Provided for instance kinds: |
| 1477 // List |
| 1478 // Map |
| 1479 // Uint8ClampedList |
| 1480 // Uint8List |
| 1481 // Uint16List |
| 1482 // Uint32List |
| 1483 // Uint64List |
| 1484 // Int8List |
| 1485 // Int16List |
| 1486 // Int32List |
| 1487 // Int64List |
| 1488 // Float32List |
| 1489 // Float64List |
| 1490 // Int32x4List |
| 1491 // Float32x4List |
| 1492 // Float64x2List |
| 1493 int count [optional]; |
| 1494 |
1442 // The name of a Type instance. | 1495 // The name of a Type instance. |
1443 // | 1496 // |
1444 // Provided for instance kinds: | 1497 // Provided for instance kinds: |
1445 // Type | 1498 // Type |
1446 string name [optional]; | 1499 string name [optional]; |
1447 | 1500 |
1448 // The corresponding Class if this Type is canonical. | 1501 // The corresponding Class if this Type is canonical. |
1449 // | 1502 // |
1450 // Provided for instance kinds: | 1503 // Provided for instance kinds: |
1451 // Type | 1504 // Type |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2161 @Isolate[] isolates; | 2214 @Isolate[] isolates; |
2162 } | 2215 } |
2163 ``` | 2216 ``` |
2164 | 2217 |
2165 ## Revision History | 2218 ## Revision History |
2166 | 2219 |
2167 version | comments | 2220 version | comments |
2168 ------- | -------- | 2221 ------- | -------- |
2169 1.0 | initial revision | 2222 1.0 | initial revision |
2170 2.0 | Describe protocol version 2.0. | 2223 2.0 | Describe protocol version 2.0. |
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
. | 2224 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. |
2172 | 2225 |
2173 | 2226 |
2174 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss | 2227 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss |
OLD | NEW |