Commit Graph

145 Commits

Author SHA1 Message Date
Alexander Aprelev a5e41681e5 Add support for expression compilation via service.
If there is registered expression compiler, VM debugger uses it to compile expressions. Otherwise, it will fallback to use kernel service compiler.
This is needed to support Flutter use case where compiler is running on developer's host machine, not on the device where VM is running.

Bug: dartbug.com/31981
Change-Id: I8bdfc8ab45a57c306169abe189f1e24e1b0bcf40
Reviewed-on: https://dart-review.googlesource.com/57520
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-05 04:16:39 +00:00
Alexander Aprelev fc206a7589 Add Kill isolate service request.
This is useful when embedder needs to kill an isolate that might be paused on a breakpoint.

Change-Id: If54decda5d16c694b81a25ae43d37f8eb41e8105
Reviewed-on: https://dart-review.googlesource.com/55276
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-21 20:00:58 +00:00
Paul Berry 98d7796662 Fix some minor typos in the service protocol documentation.
Change-Id: I05481d6bf167fee57f27d769906ec1f8f5b3b6c4
Reviewed-on: https://dart-review.googlesource.com/54711
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-14 17:58:59 +00:00
Ryan Macnak 4c0a09b79f [vm-service] Add setFlag.
Bug: https://github.com/dart-lang/sdk/issues/32709
Change-Id: I7777b005c477574c93430d56ede6cde2cd421203
Reviewed-on: https://dart-review.googlesource.com/48803
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Todd Volkert <tvolkert@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-30 18:17:55 +00:00
Devon Carew e3c8338fad Specify sentinels in the return type for evaluateInFrame.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2999103002 .
2017-08-16 15:14:27 -07:00
Devon Carew ae80af3abb Add a missing comma.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2949243002 .
2017-06-22 09:58:52 -07:00
Ryan Macnak 03a2c24edf vm-service: Add optional 'scope' parameter to 'evaluate' and 'evaluateInFrame'.
Closes #29535

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2872503004 .
2017-05-18 18:02:49 -07:00
John McCutchan 4c4c9f2ce6 Fix test failure and add new awaiterFrames to service_dev.md
BUG=

Review-Url: https://codereview.chromium.org/2788993002 .
2017-03-31 13:18:07 -07:00
John McCutchan d8555fb5a8 Include the awaiter stack trace in the service protocol
- [x] Include the (non-empty) awaiter stack trace in every `getStack` RPC.
- [x] Append the causal stack trace to the final frame of the awaiter stack trace.
- [x] Unit test for awaiter stack trace.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2782703002 .
2017-03-29 06:56:50 -07:00
Devon Carew 957961d7d3 Update the service protocol dev spec - some fields are now optional.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2692923004 .
2017-02-15 06:48:16 -08:00
Devon Carew a90c2e9ed1 Service protocol updates for the recent async work.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2683323004 .
2017-02-10 16:25:26 -08:00
John McCutchan f75d80317c Fix field name in ReloadReport
- The field is "success" not "status".

Fixes #28400

BUG=

Review-Url: https://codereview.chromium.org/2639603002 .
2017-01-17 07:12:24 -08:00
Andreas Kirsch e741a44734 fix ToC link to reloadSources (#28398) 2017-01-15 10:38:56 -08:00
John McCutchan de082ae041 Document the frameIndex parameter in the service protocol specification
BUG=
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2624493003 .
2017-01-10 07:09:36 -08:00
John McCutchan 514b88c745 Use actual tab character in service.md
BUG=

Review-Url: https://codereview.chromium.org/2616933002 .
2017-01-05 07:18:05 -08:00
John McCutchan ebe7d148f3 Document some recent service protocol features
Document the `reloadSources` RPC.

Document the `PausePostRequest` pause event.

Document the 'IsolateReloaded' event.

BUG=
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2614643003 .
2017-01-04 13:45:27 -08:00
John McCutchan 8061bd5a8a Add local variable declaration token position to service protocol
- [x] Add three public fields to the "BoundVariable" service type: declarationTokenPos, visibleStartTokenPos, and visibleEndTokenPos. (naming suggestions welcome!)
- [x] Extend LocalVarDescriptors to hold the declaration token position (it already had the scope visibility boundaries).
- [x] Extend ContextScope to hold the declaration token position.
- [x] Add a unit test which verifies this works for local variables, function parameters, and closure captured variables.

Fixes https://github.com/dart-lang/sdk/issues/25569

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2419013004 .
2016-10-17 11:18:24 -07:00
Carlo Bernaschina 1d0ec7b74c Always send typeClass field, if it is resolved
R=johnmccutchan@google.com, regis@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2223543002 .
2016-08-05 12:44:55 -07:00
Todd Turnidge 5e196ada5d VMMustBePaused -> IsolateMustBePaused
Closes #24537

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1973303003 .
2016-05-16 11:19:22 -07:00
Harry Terkelsen 1745ba77f5 fix all instances of "the the"
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1980573003 .
2016-05-13 12:38:25 -07:00
Todd Turnidge 60f7970d0b Clarify definition of token position.
Closes #26389

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1965423003 .
2016-05-11 10:49:36 -07:00
Todd Turnidge 956ac4c183 Fix getSourceReport's forceCompile option for unused classes.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1916243002 .
2016-05-04 11:02:06 -07:00
Devon Carew 4771c85c95 Fix two nits in the service protocol spec.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1895163004 .
2016-04-19 10:45:06 -07:00
John McCutchan 1c4f63df6c Print the isolate's sticky error if it has one.
- Bump protocol version to 3.4 to match service.md.
- Added note in changelog about 'none' pause event.
- Print the isolate's sticky error if it has one.

Fixes #26203

Review URL: https://codereview.chromium.org/1862903003 .
2016-04-07 15:31:50 -07:00
Todd Turnidge 22c37b9516 Improve class-tree, class-view, and instance-view.
class-tree
- Make all the rows have the same height.
- Hide synthetic mixin classes from the tree.
- Show mixin information in a different way.
- Show the total subclass count for each row if non-zero.

class-view
- Display supertype and mixin information

instance-view
- Display typeArguments, parameterizedClass, parameterIndex,
  targetType and bound information for Types.
- Display a source for Types.
- Provide an [eval] link for the runtimeType.

isolate-view
- Display the list of extension rpcs.

Update service.md.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1807263004 .
2016-03-17 12:48:48 -07:00
John McCutchan 32abe2ce55 Stream blocks of timeline events over the service protocol. Can be used to monitor long running programs without buffering all events inside the VM.
- Rename TimelineEventStreamingRecorder to TimelineEventCallbackRecorder. Note that this should only be used for tests.

- Add 'Timeline' service event stream.
- Send a 'TimelineEvents' event on the 'Timeline' stream whenever a TimelineEventBlock is finished and the 'Timeline' stream is subscribed to.

- Simple service protocol test.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1765563002 .
2016-03-04 12:30:50 -08:00
John McCutchan 49dc7e557b Fix some service protocol isolate life cycle races that were discovered by the Flutter testing tool.
Fixes #25902

Issue #1

Assuming --pause-isolates-on-start, there is a window of time after an isolate is made runnable and before it pauses at the first message that we say the isolate is "resumed".

- Fix issue #1 by claiming the isolate is paused on start if it will eventually pause on start.
- Also, handle the resume command for this state by clearing the 'should pause on start' bit.

Issue #2

Before an isolate is made runnable we say the isolate is "resumed".

- Fix issue #2 by introducing a new pause event "None".

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1756393002 .
2016-03-03 11:30:41 -08:00
John McCutchan b009231456 Add missing semicolons to service.md document
BUG=

Review URL: https://codereview.chromium.org/1708823002 .
2016-02-17 13:28:50 -08:00
John McCutchan 1ea1183f89 Mark extensionRPCs as optional
Fixes #25801

R=nweiz@google.com

Review URL: https://codereview.chromium.org/1710593002 .
2016-02-17 13:18:49 -08:00
John McCutchan 5c8d79c55a Add step OverAwait to service protocol
Additions to service protocol:

- PauseEvent includes an "atAsyncContinuation" boolean value.
- Resume command can take an 'OverAsyncContinuation' step mode.
- Breakpoints have an optional 'isSyntheticAsyncContinuation' boolean value.

Added low level step_over_await_test.

Issuing the OverAsyncContinuation resume command does the following:

- Adds a synthetic breakpoint (#1) to the async closure.
- Resumes the isolate.
- When we hit #1, the VM issues a StepOver and then reports us paused at #1.

At the next resume command, the VM will remove #1.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1699153002 .
2016-02-17 11:02:55 -08:00
Devon Carew ef95541628 Tweak to the service protocol doc; move the location of an array type indicator.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1684863003 .
2016-02-09 15:11:26 -08:00
John McCutchan 1e6c5f196b Add 'runnable' to Isolate service response
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1676233003 .
2016-02-08 10:14:17 -08:00
Todd Turnidge 222f6726d0 getObject now supports specifying offset,count for strings.
Closes #25157

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1653183002 .
2016-02-01 14:49:47 -08:00
John McCutchan ce650790a1 Return an error in many service RPCs if the isolate is not runnable
- Return kIsolateMustBeRunnable error when an isolate must be runnable for a service RPC to complete.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1645423002 .
2016-01-29 11:16:23 -08:00
Todd Turnidge bf385e448c Document the getSourceReport rpc in service.md. Bump version to 3.1.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1641133004 .
2016-01-29 10:40:18 -08:00
Devon Carew 3f459fda28 Fix a typo in the service protocol file.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1534483005 .
2015-12-17 11:38:25 -08:00
John McCutchan 89c49b9e87 Add dart:developer.postEvent for posting events to the service protocol from Dart code
- Add dart:developer.postEvent for posting events to the service protocol.
- Add 'Extension' service protocol event stream.
- Unit test.
- Update service.md

- Bug fix for logging stream.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1537523002 .
2015-12-17 09:34:52 -08:00
John McCutchan f3ee772308 Provide list of service protocol extensions in isolate and emit an event when one is registered.
- Doc improvements.
- Type annotation improvements.
- Isolate includes list of currently registered extensions.
- New event kind on isolate stream emitted whenever an extension is registered (IsolateServiceExtensionRegistered).

Fixes https://dartbug.com/25208
Fixes https://dartbug.com/25257

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1527793004 .
2015-12-16 13:49:37 -08:00
Ryan Macnak c0a0c92a5e Document the Inspect event in the service protocol.
BUG=http://dartbug.com/24998
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1465673002 .
2015-11-23 16:56:08 -08:00
John McCutchan d7de5ca71f Add exceptionPauseMode to Isolate response in service.md
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1408933004 .
2015-10-16 12:26:19 -07:00
Devon Carew ea89380185 Fix some service protocol typos.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1406913003 .
2015-10-15 09:53:28 -07:00
Todd Turnidge cc672473b9 Use offset and count to request slices of lists, maps, and typed_data.
This should allow debugging clients to support pagination of these
potentially large types.

Closes #24536

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1400393002 .
2015-10-14 11:05:21 -07:00
Natalie Weizenbaum be692b5c9f A couple small fixes to service.md.
This adds VMUpdate to the EventKind enum and fixes a formatting issue
with the table of contents.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1407583002 .
2015-10-13 13:16:25 -07:00
John McCutchan 9dd7680fd8 Straw man setExceptionPauseMode
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1399743002 .
2015-10-12 11:04:44 -07:00
John McCutchan ecb2c0b9f2 Fix two bugs in the serivce protocol specification
- Add a @VM definition.
- Correct the type of the elements field in an Instance.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1396603004 .
2015-10-12 11:03:47 -07:00
Todd Turnidge 435bcdbe6c We can now name the current VM using the service protocol.
Adds a 'VM' stream and a 'VMUpdate' event.

Makes Event.isolate optional in service.md.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1398823002 .
2015-10-08 15:37:49 -07:00
Todd Turnidge 3238cdbabb Merge pull request #24481 from dart-lang/update-instance-fields-in-spec
Update Instance fields return type in service.md
2015-10-08 12:29:14 -07:00
John McCutchan af0ab36f7c Make dart:_vmservice a proper builtin library
- Drops custom resource table for sources.
- Stops loading dart:vmservice library by sources.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1387043002 .
2015-10-06 07:58:14 -07:00
Dan Rubel e2588a72d9 Update service.md 2015-10-01 15:53:30 -04:00
John McCutchan fd6135927e Ensure that service protocol specification and implementation use the correct numeric types
Fixes #24245

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1387433002 .
2015-10-01 11:05:13 -07:00