OLD | NEW |
1 Note: this dev version of the protocol contains not yet released functionality, | 1 Note: this dev version of the protocol contains not yet released functionality, |
2 and is subject to change. | 2 and is subject to change. |
3 | 3 |
4 # Dart VM Service Protocol 3.6-dev | 4 # Dart VM Service Protocol 3.6-dev |
5 | 5 |
6 > Please post feedback to the [observatory-discuss group][discuss-list] | 6 > Please post feedback to the [observatory-discuss group][discuss-list] |
7 | 7 |
8 This document describes of _version 3.5_ of the Dart VM Service Protocol. This | 8 This document describes of _version 3.5_ of the Dart VM Service Protocol. This |
9 protocol is used to communicate with a running Dart Virtual Machine. | 9 protocol is used to communicate with a running Dart Virtual Machine. |
10 | 10 |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 | 465 |
466 See [Breakpoint](#breakpoint). | 466 See [Breakpoint](#breakpoint). |
467 | 467 |
468 Note that breakpoints are added and removed on a per-isolate basis. | 468 Note that breakpoints are added and removed on a per-isolate basis. |
469 | 469 |
470 ### evaluate | 470 ### evaluate |
471 | 471 |
472 ``` | 472 ``` |
473 @Instance|@Error|Sentinel evaluate(string isolateId, | 473 @Instance|@Error|Sentinel evaluate(string isolateId, |
474 string targetId, | 474 string targetId, |
475 string expression) | 475 string expression |
| 476 map<string,string> scope [optional]) |
476 ``` | 477 ``` |
477 | 478 |
478 The _evaluate_ RPC is used to evaluate an expression in the context of | 479 The _evaluate_ RPC is used to evaluate an expression in the context of |
479 some target. | 480 some target. |
480 | 481 |
481 _targetId_ may refer to a [Library](#library), [Class](#class), or | 482 _targetId_ may refer to a [Library](#library), [Class](#class), or |
482 [Instance](#instance). | 483 [Instance](#instance). |
483 | 484 |
484 If _targetId_ is a temporary id which has expired, then the _Expired_ | 485 If _targetId_ is a temporary id which has expired, then the _Expired_ |
485 [Sentinel](#sentinel) is returned. | 486 [Sentinel](#sentinel) is returned. |
486 | 487 |
487 If _targetId_ refers to an object which has been collected by the VM's | 488 If _targetId_ refers to an object which has been collected by the VM's |
488 garbage collector, then the _Collected_ [Sentinel](#sentinel) is | 489 garbage collector, then the _Collected_ [Sentinel](#sentinel) is |
489 returned. | 490 returned. |
490 | 491 |
| 492 If _scope_ is provided, it should be a map from identifiers to object ids. |
| 493 These bindings will be added to the scope in which the expression is evaluated, |
| 494 which is a child scope of the class or library for instance/class or library |
| 495 targets respectively. This means bindings provided in _scope_ may shadow |
| 496 instance members, class members and top-level members. |
| 497 |
491 If an error occurs while evaluating the expression, an [@Error](#error) | 498 If an error occurs while evaluating the expression, an [@Error](#error) |
492 reference will be returned. | 499 reference will be returned. |
493 | 500 |
494 If the expression is evaluated successfully, an [@Instance](#instance) | 501 If the expression is evaluated successfully, an [@Instance](#instance) |
495 reference will be returned. | 502 reference will be returned. |
496 | 503 |
497 ### evaluateInFrame | 504 ### evaluateInFrame |
498 | 505 |
499 ``` | 506 ``` |
500 @Instance|@Error evaluateInFrame(string isolateId, | 507 @Instance|@Error evaluateInFrame(string isolateId, |
501 int frameIndex, | 508 int frameIndex, |
502 string expression) | 509 string expression, |
| 510 map<string,string> scope [optional]) |
503 ``` | 511 ``` |
504 | 512 |
505 The _evaluateInFrame_ RPC is used to evaluate an expression in the | 513 The _evaluateInFrame_ RPC is used to evaluate an expression in the |
506 context of a particular stack frame. _frameIndex_ is the index of the | 514 context of a particular stack frame. _frameIndex_ is the index of the |
507 desired [Frame](#frame), with an index of _0_ indicating the top (most | 515 desired [Frame](#frame), with an index of _0_ indicating the top (most |
508 recent) frame. | 516 recent) frame. |
509 | 517 |
| 518 If _scope_ is provided, it should be a map from identifiers to object ids. |
| 519 These bindings will be added to the scope in which the expression is evaluated, |
| 520 which is a child scope of the frame's current scope. This means bindings |
| 521 provided in _scope_ may shadow instance members, class members, top-level |
| 522 members, parameters and locals. |
| 523 |
510 If an error occurs while evaluating the expression, an [@Error](#error) | 524 If an error occurs while evaluating the expression, an [@Error](#error) |
511 reference will be returned. | 525 reference will be returned. |
512 | 526 |
513 If the expression is evaluated successfully, an [@Instance](#instance) | 527 If the expression is evaluated successfully, an [@Instance](#instance) |
514 reference will be returned. | 528 reference will be returned. |
515 | 529 |
516 ### getFlagList | 530 ### getFlagList |
517 | 531 |
518 ``` | 532 ``` |
519 FlagList getFlagList() | 533 FlagList getFlagList() |
(...skipping 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2608 version | comments | 2622 version | comments |
2609 ------- | -------- | 2623 ------- | -------- |
2610 1.0 | initial revision | 2624 1.0 | initial revision |
2611 2.0 | Describe protocol version 2.0. | 2625 2.0 | Describe protocol version 2.0. |
2612 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. | 2626 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. |
2613 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. | 2627 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. |
2614 3.2 | Isolate objects now include the runnable bit and many debugger related RPC
s will return an error if executed on an isolate before it is runnable. | 2628 3.2 | Isolate objects now include the runnable bit and many debugger related RPC
s will return an error if executed on an isolate before it is runnable. |
2615 3.3 | Pause event now indicates if the isolate is paused at an await, yield, or
yield* suspension point via the 'atAsyncSuspension' field. Resume command now su
pports the step parameter 'OverAsyncSuspension'. A Breakpoint added syntheticall
y by an 'OverAsyncSuspension' resume command identifies itself as such via the '
isSyntheticAsyncContinuation' field. | 2629 3.3 | Pause event now indicates if the isolate is paused at an await, yield, or
yield* suspension point via the 'atAsyncSuspension' field. Resume command now su
pports the step parameter 'OverAsyncSuspension'. A Breakpoint added syntheticall
y by an 'OverAsyncSuspension' resume command identifies itself as such via the '
isSyntheticAsyncContinuation' field. |
2616 3.4 | Add the superType and mixin fields to Class. Added new pause event 'None'. | 2630 3.4 | Add the superType and mixin fields to Class. Added new pause event 'None'. |
2617 3.5 | Add the error field to SourceReportRange. Clarify definition of token pos
ition. Add "Isolate must be paused" error code. | 2631 3.5 | Add the error field to SourceReportRange. Clarify definition of token pos
ition. Add "Isolate must be paused" error code. |
2618 3.6 (unreleased) | Add 'scopeStartTokenPos', 'scopeEndTokenPos', and 'declaratio
nTokenPos' to BoundVariable. Add 'PausePostRequest' event kind. Add 'Rewind' Ste
pOption. Add error code 107 (isolate cannot resume). Add 'reloadSources' RPC and
related error codes. | 2632 3.6 (unreleased) | Add 'scopeStartTokenPos', 'scopeEndTokenPos', and 'declaratio
nTokenPos' to BoundVariable. Add 'PausePostRequest' event kind. Add 'Rewind' Ste
pOption. Add error code 107 (isolate cannot resume). Add 'reloadSources' RPC and
related error codes. Add optional parameter 'scope' to 'evaluate' and 'evaluate
InFrame'. |
2619 | 2633 |
2620 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss | 2634 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss |
OLD | NEW |