Commit graph

290 commits

Author SHA1 Message Date
Elliott Brooks 4ac70a3696 Add 'cache-control: no-store' header to DevTools server
Bug: https://github.com/flutter/devtools/issues/3896
Change-Id: I5cfc2e92716517a044a848339426feb827bb64cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286100
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-01 01:13:40 +00:00
Danny Tuppeny 2d1373bc56 Add missing changelog entry for breakpoint changes
Change-Id: I6fd6683c728226c8885256ba0e2511858931adc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285910
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-02-28 17:16:49 +00:00
Danny Tuppeny 6bce1b1e7c [dds/dap] Add global variables to scopes/variables requests
Fixes https://github.com/Dart-Code/Dart-Code/issues/4408.

Change-Id: I8a6f7e15f1db247424db23518e53c821d519f1e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285904
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-02-28 17:16:49 +00:00
Danny Tuppeny 55cb3ce24b [dds/dap] Add support for breakpoint resolution
Previously we just always sent verified:true for all breakpoints and never handled resolution. This meant breakpoints always appeared verified in VS Code, and did not update to their correct locations when resolved.

This change sends verified:false initially, and then uses the BreakpointAdded/BreakpointResolved events to send verified:true and an updated location as the events arrive.

Fixes https://github.com/Dart-Code/Dart-Code/issues/764.

Change-Id: I5b008bef802bb1c31219175a03498f5015ec4a04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285909
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-02-28 15:52:31 +00:00
Derek Xu c0c523122b Reland "[VM/Service] Start indexing positional record fields at 1"
This is a reland of commit 1be893c507

Patchset 2 fixes the failure that was in
pkg/dds/test/dap/integration/debug_variables_test.

TEST=CI

Original change's description:
> [VM/Service] Start indexing positional record fields at 1
>
> TEST=CI
>
> Fixes: https://github.com/dart-lang/sdk/issues/51451
> Change-Id: I0e00e0ffb35aeb40affbbd5544542723bafc747c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284722
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Change-Id: I4cdee610646b3389d7d02ee6d905a66ae6e0329d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284862
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-02-23 17:04:10 +00:00
Danny Tuppeny 3d39175f5d [dds/dap] Improve display of errors calling toString() in debug views
Fixes https://github.com/Dart-Code/Dart-Code/issues/4400.

Change-Id: I46b36bcacdd0f8a33f296569fbc2e4ebece9d0f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284701
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-02-22 17:11:12 +00:00
Devon Carew 2d15cad9e5 [pkg/dds] use package:lints/recommended.yaml
Change-Id: I05eb1af5dd985ee9f752b8ea409cabc785740472
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283964
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-02-21 18:30:23 +00:00
Danny Tuppeny 43e26f18cc [dds/dap] Add support for showing inspect() variables in the debug console
This adds functionality that exists in the legacy VS Code DAP but was not reproduced here.

Calling `inspect(var)` (from `dart:developer`) would print the inspected variable to the Debug Console where the user can expand and review it (similar to using the Watch window).

Fixes https://github.com/Dart-Code/Dart-Code/issues/4330.

Change-Id: Ic63e6b6eb9f149dc8d80c4efdf622fb1c05bd580
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284183
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-02-21 15:57:28 +00:00
Danny Tuppeny 9356df41a0 [dds/dap] Ensure variable evaluateNames are stored for all lists/fields/getters
"evaluateNames" are returned to the client along with any variables, so the client can provide the user an expression that evaluates to that variable (used by "copy expression" or "add to watch".

DAP doesn't round-trip these as you expand variables, so we have to track them ourselves, but we were only doing so for map values. This fixes that to handle lists, getters, fields correctly too.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4352.

Change-Id: Id57e46a1cecf8bd22473911340b649ac05da65fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284223
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-02-21 15:56:58 +00:00
Dan Chevalier 7599222465 Update to vm_service:11.0.0 in dds
Changing the vm_service version to allow 11.0.0.

Change-Id: I78c5cdc474228e2d280e62ff408a12ea05df1ae3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282460
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-02-13 15:12:55 +00:00
Ben Konyi c14cc6d75b [ package:dds ] Fix TypeError when attempting to debug DevTools requests
TEST=Manual

Change-Id: I043d52fe8863e2ea159300990db48dd05b7bc199
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280051
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-02-01 16:01:29 +00:00
Danny Tuppeny 72cb7dd238 [dds/dap] Map fileUri/uri fields in ToolEvents before sending to client
This handles cases where the running app/VM was unable to provide a file:/// URI (such as google3) by calling the VM Service to translate the URIs before providing them to the client (which likely only understands file URIs).

Change-Id: Ib0b5d554a21e14e04fac6c05e489f5cc03b8301c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280107
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-02-01 15:04:19 +00:00
Josh Soref 77978889eb Spelling
Closes https://github.com/dart-lang/sdk/pull/51143

GitOrigin-RevId: 9e21c99a222d588e4fc95980725a2f8c9784965c
Change-Id: If0870e8936c7649935dce7e23cd783d62aa5610c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279916
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-30 18:29:59 +00:00
Ahmed Ashour 63180b95ed Remove superfluous words.
Fixes #51095

TEST=ci

CoreLibraryReviewExempt: There are no API changes, just removal of superfluous words in the comments.
Change-Id: Ib1020c62fe6baed5ca68f0074323f025cc90e9f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279500
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-01-30 15:58:38 +00:00
Danny Tuppeny 16ede0e1d3 [dds] Bump version and update changelog to reflect published 2.7.3
Change-Id: I4a0f75fdf6ebf5cb3a2ba88996127096af0b9d56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280090
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-01-30 14:42:44 +00:00
Danny Tuppeny b1c44bf87d [dds/dap] Support format.hex in DAP evaluateRequest + variablesRequest
This adds support for hex formatting that is part of the DAP protocol.

VS Code does not support this natively, so it will require some custom client work. Part of that requires the ability to invalidate the variables view when formatting options change, but this can only be done by the server over DAP, so this also includes a small custom ("private") request "_invalidateAreas" that lets the client bounce this request through the server when it knows the formatting config has changed.

Change-Id: Ic005e9cdf13069b848047cf0a7ac1b8bb39da48f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279963
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-01-26 18:33:57 +00:00
Danny Tuppeny 1ff357f0f7 [dds/dap] Tidy up variables formatting and allow "format specifiers" in evaluation expressions
This adds some new classes to support different formatting of values in expression evaluation/watch/variables panes.

Some existing code that passed a flag around to suppress quotes has been converted to this use, and in addition, we support some C#-inspired "format specifiers" that allow you to influence the formatting of returned values by adding a suffix to a watch/evaluation expression:

https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/e514eeby(v=vs.100)?redirectedfrom=MSDN

So if you add "foo" and "foo,nq" to your watch window, the latter will format the string without quotes. If you add "a" and "a,h" then the latter will format a in hex.

Format specifiers are carried down, so you can add ",h" to a class or list variable, and each value down the tree will be formatted that way.

Partly fixes https://github.com/Dart-Code/Dart-Code/issues/3940.

Change-Id: I78001bd046ee2586bd828752f9ea08da01e7180c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279961
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-01-26 17:16:36 +00:00
Sam Rawlins bb78e4f288 [dds] Replace @alwaysThrows with Never
Bug: https://github.com/dart-lang/sdk/issues/49583
Change-Id: I247e8c81c010e37a85b938f9b8dfc6a1765bbf85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279741
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-01-25 11:13:49 +00:00
Danny Tuppeny 589876ba6a [dds/dap] Don't try to send invalid URIs to VM Service _lookupResolvedPackageUris
Fixes https://github.com/Dart-Code/Dart-Code/issues/4358.

Change-Id: I70330d8d5dd3bdcb2aa9753212cd56ff46bf4344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279513
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-24 21:46:33 +00:00
Alexander Thomas b9b6511ca6 Spelling sdk
Closes https://github.com/dart-lang/sdk/pull/50918

Co-authored-by: Josh Soref <jsoref@gmail.com>
GitOrigin-RevId: 1fd275051c561b63d374fb47e76a22424c4a12a9
Change-Id: I97790d9c79ff659f2c1fa2d2d46d041fe67957cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278530
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-01-20 12:37:49 +00:00
Danny Tuppeny 0f065ef477 [dds/dap] Support showing Record fields in debugger views
Change-Id: I799d30995dc1d1f8cd0c0bad79bf7305e5dbc1ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279353
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-19 16:38:47 +00:00
Josh Soref 9e4dc755cb Spelling pkg
Closes https://github.com/dart-lang/sdk/pull/50921

GitOrigin-RevId: 6b1ca502b6722b0a987f33ace66f65cbd2c24e23
Change-Id: I74e4ff3c8e759c576036d6b791bd7734ebd215d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278536
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-19 10:06:29 +00:00
Danny Tuppeny 4fdbe1b47d [dds] Pass existing DDS URI in existingDdsInstance exception
Work towards a better fix for https://github.com/flutter/flutter/issues/118609.

Change-Id: I7db8bd74cc272a2bb1df3a04e6f1d7b82b877ddb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279175
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-18 20:36:07 +00:00
Danny Tuppeny 7734f11b3b [dds/dap] Switch SILENT_OBSERVATORY to SILENT_VM_SERVICE
+ remove some other Observatory references.

Change-Id: I06d1085b2e0cc82f756bf45178b824382283762a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279085
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-16 18:37:25 +00:00
Ben Konyi 0a0c90e37a [DDS] Prepare for 2.7.2 release
Change-Id: Ifb4cac218b2723e52b76936a6b8275fed6a3a3d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279121
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-01-16 16:31:28 +00:00
Ben Konyi 3a77ebda65 [ DDS ] Ignore method no found responses for streamCpuSamplesWithUserTag
DWDS does not implement streamCpuSamplesWithUserTag and DDS can invoke
it without being prompted to by a client. This change gracefully handles
the absence of this RPC.

Related DWDS change: https://github.com/dart-lang/webdev/pull/1889

Change-Id: Ic821f39caefd25044c2c4a8b34a8271879c7bd5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279020
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-13 17:55:01 +00:00
Danny Tuppeny 3949fe9aec [dds/dap] Forward toolEvents on to the DAP client
Progress towards https://github.com/Dart-Code/Dart-Code/issues/4193.

Also related:
- https://github.com/flutter/flutter/pull/118098
- 4981cbffe2

Change-Id: I7b1394a5d5003c24b90733f1898fe368c0485937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278515
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-13 17:49:12 +00:00
Derek Xu ac23909288 [pkg:dds] Update pkg:vm_service dependency to >=9.0.0 <11.0.0
Change-Id: I6525b63c854dff454700425e142dc69a850169ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278946
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-01-13 15:56:23 +00:00
Ben Konyi ab5b7d7ad1 [ DDS / VM Service ] Simplify DevTools URI construction
DevTools no longer expects a fragment (i.e., '#') in its path, which was
causing issues when attempting to redirect to an external DevTools
instance.

Also removes unnecessary query parameter encoding.

TEST=Existing tests

Change-Id: Ifbeba62c173141a754951527f44ab337318a21d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278669
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-11 21:22:50 +00:00
Derek Xu 9a7d8857ec [pkg:dds, pkg:dds_service_extensions] Update pkg:vm_service dependency to ^10.0.0
Change-Id: I93d0690edf2bc9b21ac39707ed5dceb2488901b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278940
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-01-11 18:01:43 +00:00
Ben Konyi 52f62eaea8 [ package:dds ] Add support for registering external DevTools servers with DDS
External DevTools instances can be registered with DDS at runtime, allowing for DDS
to redirect DevTools requests to the external DevTools server.

TEST=pkg/dds/test/external_devtools_instance_test.dart

Change-Id: I0bed34029b6ea7d935f77a031ff99b73b986b068
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278663
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-10 16:03:41 +00:00
Danny Tuppeny 5b50a61918 [dds/dap] Fix handling of errors when fetching full strings
Fixes https://github.com/dart-lang/sdk/issues/50802.

Change-Id: Ia2bda968708f34aa48c6b92b2f19c24c603fb85c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278349
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-06 16:54:03 +00:00
Ben Konyi 112e1213dc [ package:dds ] Prep for 2.6.0 release
Change-Id: I7ffcd1c9cdf23906324ef77521216bb293259c08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276620
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-06 15:26:34 +00:00
Danny Tuppeny ec8918c20c [dds/dap] Handle errors parsing/casting launch/attach arguments and provide useful errors
Fixes https://github.com/dart-lang/sdk/issues/50709.

Change-Id: I35a7593ced462ab81d52069db831e5f95a9a4ba7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275623
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-12-14 17:19:05 +00:00
Dan Chevalier fd6fa010ec [ VM Service / DDS ] Add custom service stream support (Revised)
NOTES:
Original CL: https://dart-review.googlesource.com/c/sdk/+/274061
Revert CL: https://dart-review.googlesource.com/c/sdk/+/274802

Regression tests that failed after merging Original CL:
- https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/pkg-mac-release/24046/overview
- https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/pkg-mac-release-arm64/5999/overview

----------
DESCRIPTION:
Setting the `stream` parameter on `developer.postEvent` will now forward those events to a custom stream inside DDS.


The first use of this will be for widget inspection. A navigation event will be posted to a custom stream. Our IDE DAP can listen for the Event and react to it by navigating to the desired location in the code.

TEST=Made sure that regression from original PR could be reproduced, and then resolved by applying this change. Updated observatory tests. Created new developer test to check assertions. Added DDS tests for new custom stream behaviour. Manually tested the postEvent and StreamListen with multiple clients

https://github.com/flutter/devtools/issues/4533

Change-Id: I2b04a84b4daf11dd9d72f899928b5e1f62a5ae02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275121
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-12-13 16:31:37 +00:00
Dan Chevalier 3ed65601b0 Revert "[ VM Service / DDS ] Add custom service stream support"
This reverts commit 4981cbffe2.

Reason for revert: Mac regression test failed.

Original change's description:
> [ VM Service / DDS ] Add custom service stream support
>
> Setting the `stream` parameter on `developer.postEvent` will now forward those events to a custom stream inside DDS.
>
>
> The first use of this will be for widget inspection. A navigation event will be posted to a custom stream. Our IDE DAP can listen for the Event and react to it by navigating to the desired location in the code.
>
> TEST=Updated observatory tests. Created new developer test to check assertions. Added DDS tests for new custom stream behaviour. Manually tested the postEvent and StreamListen with multiple clients
>
> https://github.com/flutter/devtools/issues/4533
>
> Change-Id: I870dc634c9a9a7d2ee3a6605319c2a18517ad197
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274061
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Dan Chevalier <danchevalier@google.com>

TBR=bkonyi@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com,danchevalier@google.com

Change-Id: Ia1dce25444a6329c0553c931c9a6dbbec65ee583
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274802
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Dan Chevalier <danchevalier@google.com>
2022-12-12 11:24:37 +00:00
Dan Chevalier 4981cbffe2 [ VM Service / DDS ] Add custom service stream support
Setting the `stream` parameter on `developer.postEvent` will now forward those events to a custom stream inside DDS.


The first use of this will be for widget inspection. A navigation event will be posted to a custom stream. Our IDE DAP can listen for the Event and react to it by navigating to the desired location in the code.

TEST=Updated observatory tests. Created new developer test to check assertions. Added DDS tests for new custom stream behaviour. Manually tested the postEvent and StreamListen with multiple clients

https://github.com/flutter/devtools/issues/4533

Change-Id: I870dc634c9a9a7d2ee3a6605319c2a18517ad197
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274061
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2022-12-09 20:18:30 +00:00
Danny Tuppeny c53f70509c [dds/dap] Filter private getters from debug views
These will fail unless the current stack frame happens to be in the library that declares them, which results in a lot of exceptions being shown in variable views.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4296.

Change-Id: I5919e391f25a08920dcdf1bf648526d175af00f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274040
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-12-08 15:02:04 +00:00
Devon Carew 99026df0f8 [deps] update package:webdriver
Change-Id: Iaa875c46f1425160063b5cc5f44e87a60c5e61dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273003
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-12-01 17:42:21 +00:00
Danny Tuppeny 4cd0ef7402 [dds/dap] Address code review nits
Change-Id: I7a03650ba1d8df7b0f11db3408f9e55525b61aa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266580
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-10-31 17:23:52 +00:00
Sam Rawlins 1739cc6d89 Add BODY_MIGHT_COMPLETE_NORMALLY_CATCH_ERROR hint
This is similar to BODY_MIGHT_COMPLETE_NORMALLY (the static error),
BODY_MIGHT_COMPLETE_NORMALLY_NULLABLE (the Hint for nullable return
types), and RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR, combining the
rules from each.

https://github.com/dart-lang/sdk/issues/49215 (but maybe doesn't close,
if the core issue is the VM issue)

Change-Id: I9a010e5a3f0f88abfdab479339e5e76759ae9d92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247863
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-27 18:21:47 +00:00
Danny Tuppeny 37be66028b [dds/dap] Allow debug adapters to register multiple mappings for org-dartland-sdk URIs
Change-Id: Ibcb0f145d64c7cd7712c031737741b2dbc4aaab8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265500
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-26 14:26:01 +00:00
Danny Tuppeny 96294014e3 [dds/dap] Allow debug adapters to override the org-dartlang-sdk URI for the Dart SDK
Change-Id: I74432315d4bfa8e9890e0bd86fa0fa67d591f7fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265322
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-25 14:03:29 +00:00
Danny Tuppeny bc7094dbc1 [dds/dap] Ensure "terminated" event is sent when detaching from processes
Change-Id: I466f97c2d98649b77412396e462bf3ae9c9e7f6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264481
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-18 13:26:35 +00:00
Danny Tuppeny ae352fe940 [dds/dap] Improve handling of lists in variables requests
Fixes https://github.com/Dart-Code/Dart-Code/issues/4204.
Fixes https://github.com/Dart-Code/Dart-Code/issues/4213.

Change-Id: Ibd95a149e6f620efb690c24623bb6b9d04a794b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263620
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-17 21:51:36 +00:00
Danny Tuppeny 946eec8330 [dds/dap] Optimise computing line/col for stack frames
See https://github.com/Dart-Code/Dart-Code/issues/4209 / https://github.com/Dart-Code/Dart-Code/issues/4208.

Change-Id: I62f029d50e7b0b1964868c9221ca7b0a387dc23a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263300
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-10 18:22:23 +00:00
Danny Tuppeny e2d63974a7 [dds/dap] Fix flaky test
We shouldn't fail ("Future already completed") if the timing allows multiple errors from the bad input to arrive during the test run.

Change-Id: I358b8401b865c22d5808c22e463dea0e6416f6ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261602
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-09-28 13:47:46 +00:00
Danny Tuppeny 17bd00df50 [dds/dap] Attempt to fix flaky tests on Linux during shutdown while debugger is initializing
Fixes https://github.com/dart-lang/sdk/issues/50058.

Change-Id: Ia0b498a4f1c943bc1f21f940c533584837ba5311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261401
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-09-27 15:43:13 +00:00
Danny Tuppeny fe8c22cc69 [dds/dap] Support sending standard and custom progress notifications
This adds the ability to send DAP progress notifications to the client. In this change, the CLI adapter sends them when connecting to the debugger, although the main motivation is to provide feedback when Hot Reload/Hot Restart is in progress (which will be handled in the Flutter adapter once this rolls in).

Additionally, a flag allows sending custom notifications because VS Code's standard handling of notifications (which delays showing them for 500ms) does not work well for Flutter hot reload/hot restart (which can often complete in less time than that) so sending custom events allows the Dart extension to show the progress immediately instead.

Change-Id: I1c91da6dc023b3d2d6cf3c6e8b8bbb53ee5167d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261102
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-09-26 15:26:47 +00:00
Ben Konyi 4eda3397f3 [ DDS ] Fix IsolateManager.initialize() not correctly handling Sentinel responses
Fixes https://github.com/flutter/flutter/issues/111926

Change-Id: Iabde854f74410c0eb85f1e4d4ac24f6756395ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260220
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jason Simmons <jsimmons@google.com>
2022-09-20 18:51:05 +00:00