Commit graph

187 commits

Author SHA1 Message Date
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
Ben Konyi
db6311beca [ DDS ] Fix IsolateManager.initialize() not correctly handling Sentinel responses
Fixes https://github.com/flutter/flutter/issues/111482

Change-Id: I11eff2c140ea621550f33e2ddf0ab8092e9248db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259400
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2022-09-15 13:56:43 +00:00
Danny Tuppeny
1b9adcb502 [dds/dap] Normalise Windows drive letters to avoid missing breakpoints
See https://github.com/dart-lang/sdk/issues/32222.
See https://github.com/Dart-Code/Dart-Code/issues/4149.

Change-Id: I6f975734839ff7cad4d086d5363c0ab03390b966
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258900
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-09-13 13:24:47 +00:00
Danny Tuppeny
70e8dc6ee4 [devtools] Ping browsers running DevTools before trying to reuse them
It's possible the browser has been closed but is in the SSE timeout period and therefore looks active. Ping it to see if it's actually responsive before deciding whether to reuse it or launch a new window.

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

Change-Id: I2fdcba036b8b63f7ab974e8fef5dd565c2917b64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257581
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-09-07 17:38:57 +00:00
Danny Tuppeny
94a64a01f6 [dds/dap] Handle duplicate breakpoints and failure to remove breakpoints
Fixes https://github.com/flutter/flutter/issues/111045, along with another issue where multiple client breakpoints that map to the same VM breakpoint could cause an error during removal.

Change-Id: Ifb396b9cb9df4a0297a4b55b31494e229289191d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257962
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-09-07 13:50:27 +00:00
Danny Tuppeny
6c8bacc73a [dds] Remove unused parameter from DartDebugAdapter.connectDebugger
Change-Id: Ib3d3edd4ca1f7a8491a98c764c78045abd075b3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257641
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-09-06 14:53:46 +00:00
Danny Tuppeny
56f8caa9d4 Mark env as required on DartAttachRequestArguments
Fixes a TODO.

+ some minor comment improvements.

Change-Id: I1f6249376e3891e0d20f01269493ffcc4d9aec55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253940
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-08-08 13:33:20 +00:00
Helin Shiah
884cfae2c7 Make changes for internal debug
- Convert to google3:/// scheme and call `lookupPackageUris` for setting
  breakpoints
- Return file:/// scheme URIs from DDS

Change-Id: If9a541be21f5830ec68dc39eb2f308f7ce90c5fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252782
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-07-28 18:30:10 +00:00
Danny Tuppeny
38dc6e7dc8 [dds] [dap] Ensure debug adapter shuts down on clean termination
Change-Id: I1baa77dd933a49c1df435ccc31eb6cf8995e3ff3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252660
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-07-25 19:18:49 +00:00
Ahmed Ashour
99f0fb5b70 Fix typos
Fixes #49364

TEST=ci

Change-Id: Ic643819c9cdd7b56690981b96b854b1e8d622fff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250160
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-12 19:35:22 +00:00
Ben Konyi
cc92eb0a7f [ CLI ] Fix LateInitializationError in DartDev when passed an invalid flag
`log` was previously initialized after argument parsing had already
taken place, which caused an exception when an invalid flag was passed
to DartDev as `log` was referenced in the `dart fix` command
description, which is accessed when building the usage message.

Also fixes a minor test failure related to usage line lengths not being
set correctly for `dart devtools`.

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

Fixed: 49437
Change-Id: Ib367677db5f34d7b6da31e51dbe717c954298ecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251241
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-07-12 18:22:42 +00:00
Danny Tuppeny
2a440e14f1 [dds] Include exception text in DAP StoppedEvent text field
Fixes https://github.com/Dart-Code/Dart-Code/issues/4039.

Change-Id: Ibe362a3eaaea1ab9b6075501cb9a245d8daba737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250745
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-07-07 13:15:01 +00:00
Danny Tuppeny
eb6aa221f0 [dds] [dap] Fix bug that tried to remove previously-removed breakpoints
Fixes https://github.com/flutter/flutter/issues/106369.

Change-Id: I17fb46ad0ea0f30707ff6280f2e8269662e376f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249485
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-06-23 13:42:55 +00:00
Danny Tuppeny
fe8dd70d47 [dds] Extract sending debugger URIs into a method that can be called by other adapters
Flutter needs to send Debugger URIs to the client in some cases where we're not connected ourselves (profile mode, where the IDE wants a VM Service for DevTools, but is not debugging).

Change-Id: I901ca02be7c0bfff5130f2e41b83923b1d518e76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249300
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-06-21 14:48:34 +00:00
Danny Tuppeny
51eed0cffd [dds] Fix code generation for type references to simple types
Fixes https://github.com/dart-lang/sdk/issues/49268.

Change-Id: Iaeda8271d8cb922511958a71cf1300ba64df16da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248605
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-06-17 18:26:09 +00:00
Ahmed Ashour
85700570f6 Fix typos
Fixes #49241

TEST=ci

Change-Id: I6117bf816fc8c4613cce66927f952fef75632725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248120
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-15 11:08:28 +00:00
Danny Tuppeny
3056251f90 [dds] Handle methodNotFound errors for setLibraryDebuggable for DWDS
DWDS doesn't currently support this so the unhandled error will terminate the DAP when running under Flutter web:

https://github.com/dart-lang/webdev/issues/606

Change-Id: I14f2dbffca66244268802924e347e2d70eec30a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248124
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-06-14 16:36:47 +00:00
Helin Shiah
d6665ae4cd Reland "[ Service / DDS ] Add method that can return local paths"
This is a reland of commit a091ff7b27

TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.

Original change's description:
> [ Service / DDS ] Add method that can return local paths
>
> TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.
>
> Change-Id: Ibe80b6229c574c976379a519baca5d1904b684b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245040
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

Change-Id: I87433a410715393f853a6538dbfe67391e0c773b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246621
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-06-01 21:22:34 +00:00
Helin Shiah
a8e6756c74 Revert "[ Service / DDS ] Add method that can return local paths"
This reverts commit a091ff7b27.

Reason for revert: Breaks DevTools and DWDS on internal roll

Original change's description:
> [ Service / DDS ] Add method that can return local paths
>
> TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.
>
> Change-Id: Ibe80b6229c574c976379a519baca5d1904b684b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245040
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,kenzieschmoll@google.com,helinx@google.com

Change-Id: I59d7687ba722fb1f5c706196691fc8471fe862ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246057
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-05-26 18:46:39 +00:00
Helin Shiah
a091ff7b27 [ Service / DDS ] Add method that can return local paths
TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.

Change-Id: Ibe80b6229c574c976379a519baca5d1904b684b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245040
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-05-26 17:45:39 +00:00
Danny Tuppeny
5dafbb8889 [dds] Provide better error output for DAP protocol violations
See https://github.com/flutter/flutter/issues/99734.

Change-Id: Idf23f745d0736db41a195fd5294b5f545c2a39a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240541
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-04-27 14:12:54 +00:00
Danny Tuppeny
db0d9b1852 [dds] Serve DevTools index page for extension-less requests to support UrlPathStrategy
Change-Id: I780e16b391dda6159c99b4844f6663dad02a98af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239082
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-04-25 14:12:13 +00:00
Devon Carew
169365f953 Move pkg/dds to package:lints.
Change-Id: I614a826569fee248b72f973a863e758949c04932
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241146
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-14 22:44:33 +00:00
Ben Konyi
2aed3ea034 [ DDS ] Add R/W-like locking around streamListen and streamCancel
Reduces latency for concurrent stream subscriptions while no
subscription cancellations are pending.

TEST=Existing regression tests

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

Change-Id: I548bc5d1f30fddcf03af397a2c2b3ed8beeb09f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239862
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-04-04 23:16:42 +00:00
Kenzie Schmoll
2e895ad146 Remove duplicated devtools_shared code from dds.
Fixes https://github.com/flutter/devtools/issues/3571.

Change-Id: I168b44ef0e59a16695ce824499dff774ba46f3d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239800
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2022-04-01 16:22:36 +00:00
Danny Tuppeny
8e90d6ac15 [dds] Fix deserialisation of env vars in DAP
Change-Id: Ia3da6d4abdfd41b4b4f6631fd82d8680ee1727b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239309
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-29 18:39:29 +00:00
Elliott Brooks
9f4d5b6e4a Set the cache-control header's max-age value to 0s for DevTools.
This ensures that the `index.html` file (which determines whether to
load the new service worker and therefore invalidate the cache) will
always be fresh.

Bug: https://github.com/flutter/devtools/issues/3896
Change-Id: Ib0b6adda66b7dd926f57724f21c2a7c6284bce60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237842
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2022-03-18 22:46:02 +00:00
Danny Tuppeny
02d9c3e6a5 [dds] Improve suppression of auto-resuming threads when attaching to processes
Hopefully fixes https://github.com/dart-lang/sdk/issues/48274.

Change-Id: I893a1f5dee54410986644a52b7c2bb406d4e51f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237683
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-17 19:07:36 +00:00
Ben Konyi
8c484d12fe Reland "[ Service / DDS ] Remove VM service polling logic, add --enable-service-fallback-port support to DDS"
This reverts commit d4f71515c7.

TEST=CQ

Change-Id: I180f9d045870a1ff5f7f3f82b6f4782e18c18cfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237440
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-15 18:14:42 +00:00
Emmanuel Pellereau
d4f71515c7 Revert "[ Service / DDS ] Remove VM service polling logic, add --enable-service-fallback-port support to DDS"
This reverts commit bd8590ba9b.

Reason for revert: breaks google3 (b/224731131)

TEST=Clean revert

Original change's description:
> [ Service / DDS ] Remove VM service polling logic, add --enable-service-fallback-port support to DDS
>
> Polling logic was introduced due to a bug in Fuchsia's network stack
> which could result in the VM service attempting to start the server
> before the network stack was initialized. This issue should be resolved
> now, so this logic is no longer necessary.
>
> TEST=pkg/dartdev/test/commands/run_test.dart
>
> Change-Id: I10f185dfb1be1b0363983f3e0564d65c38c99ea8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235763
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: I3016fad25220c4e5479f17294626d79a17bd316a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237360
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
2022-03-15 12:01:30 +00:00
Ben Konyi
bd8590ba9b [ Service / DDS ] Remove VM service polling logic, add --enable-service-fallback-port support to DDS
Polling logic was introduced due to a bug in Fuchsia's network stack
which could result in the VM service attempting to start the server
before the network stack was initialized. This issue should be resolved
now, so this logic is no longer necessary.

TEST=pkg/dartdev/test/commands/run_test.dart

Change-Id: I10f185dfb1be1b0363983f3e0564d65c38c99ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235763
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-14 21:44:29 +00:00
Kenzie Schmoll
167970dea7 Reland "Add DevTools Server test and test driver to DDS"
This reverts commit d0dff0e9ba.

Reason for revert: fixed broken tests to reland.

Original change's description:
> Revert "Add DevTools Server test and test driver to DDS"
>
> This reverts commit 02bff5bde2.
>
> Reason for revert: broken tests. (e.g. https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/pkg-mac-release/20638/overview)
>
> Original change's description:
> > Add DevTools Server test and test driver to DDS
> >
> > Bug: https://github.com/dart-lang/sdk/issues/48300
> > Change-Id: I3b72274d111489448a482d65eb7cc23a9f263edf
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233320
> > Reviewed-by: Ben Konyi <bkonyi@google.com>
> > Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
>
> TBR=bkonyi@google.com,kenzieschmoll@google.com
>
> Change-Id: Iaca6b34a4e55ddd7b984b49821f3cc95337d696a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/48300
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234114
> Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
> Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/48300
Change-Id: I60ffd0e8a394353014408530d636c5918e517a59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234861
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2022-03-09 16:48:54 +00:00
Kenzie Davisson
d0dff0e9ba Revert "Add DevTools Server test and test driver to DDS"
This reverts commit 02bff5bde2.

Reason for revert: broken tests. (e.g. https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/pkg-mac-release/20638/overview)

Original change's description:
> Add DevTools Server test and test driver to DDS
>
> Bug: https://github.com/dart-lang/sdk/issues/48300
> Change-Id: I3b72274d111489448a482d65eb7cc23a9f263edf
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233320
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>

TBR=bkonyi@google.com,kenzieschmoll@google.com

Change-Id: Iaca6b34a4e55ddd7b984b49821f3cc95337d696a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/48300
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234114
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2022-02-23 23:46:44 +00:00
Kenzie Schmoll
02bff5bde2 Add DevTools Server test and test driver to DDS
Bug: https://github.com/dart-lang/sdk/issues/48300
Change-Id: I3b72274d111489448a482d65eb7cc23a9f263edf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233320
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2022-02-23 21:09:04 +00:00
Elliott Brooks
a6c96a4707 Allow Dart DevTools to be embedded in Chrome DevTools.
Change-Id: Iff97f9dbc432ed926d668ac8339c32b679e316ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232482
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2022-02-10 23:52:41 +00:00
Nate Bosch
33e174084a Replace Uri.scheme == with Uri.isScheme
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.

TEST=No behavior changes.

Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-02-08 21:38:57 +00:00
Kenzie Schmoll
deb9cd31e7 Add missing 'help' option to DevTools server arg parser.
This option existed in the previous impl of devtools server: https://github.com/flutter/devtools/blob/v2.10.0/packages/devtools_server/lib/src/server.dart#L507-L516

Change-Id: Icdc2f1b29e9128531a51fbc471c7b52e761e8f31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232122
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2022-02-08 19:15:56 +00:00
Jason Simmons
779c28db7a [ DDS ] Fix a null safety error in memory_profile.dart
See https://github.com/flutter/flutter/issues/97588

Bug: 97588
Change-Id: I95fc1b50b936b7d15d674cc7e1c6908975989d47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231533
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-04 01:11:46 +00:00
Danny Tuppeny
692f9c28eb [dds] Ensure thread startup is not handled twice in DAP when attaching
Should fix the flakes seen in https://github.com/dart-lang/sdk/issues/48274 caused by Isolate PauseStart events arriving during initialization but being delayed until initialization complete, and then auto-resuming isolates that ere deliberately being left paused.

Change-Id: Iee32731b92fe96b6b41e7e78c01af2f5e843ea92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231460
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-03 17:41:46 +00:00
Ben Konyi
f8ec0f405b [ DDS ] Fix LateInitializationError in memory_profile.dart
Fixes https://github.com/flutter/flutter/issues/97588

Change-Id: I67f7bf20464bea105fa12fae99b6e4912899a1f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231180
Reviewed-by: Jason Simmons <jsimmons@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-01 23:16:15 +00:00
Ben Konyi
d1baf327a1 [ DDS / CLI ] Add serveDevToolsWithArgs to devtools_server library
Also moves ArgParser creation for `dart devtools` from dartdev to
devtools_server

Change-Id: I26e0c1a14eeccda163c9e62a240c4bd57a13f382
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230541
Reviewed-by: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-28 00:02:01 +00:00
Ben Konyi
0c2079561b [ DDS ] Handle case where requested DDS port is already in use
Instead of hanging with no output to the console, a useful error message
is output to the console before shutting down the VM process.

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

Change-Id: Ib37c0cdf8b1bae6f164abff4a3b3100e944d8a3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228961
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-19 22:43:37 +00:00
Danny Tuppeny
ff7058162b [dds] Fix misleading type in DAP comment
Change-Id: Ia79ec0ea3b7191619b905af91d7ff49fa1447753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228921
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-01-19 20:36:23 +00:00
Danny Tuppeny
8ad21c037c [dds] Fix DAP stack frame parsing for Windows
Fixes https://github.com/dart-lang/sdk/issues/48166.

Change-Id: I6aa28f7123906e9e2ce01615f975d97670a7c99d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-19 17:18:35 +00:00
Ben Konyi
3b736b8460 [ package:dds ] Migrate package:devtools_server functionality under package:dds/devtools_server.dart
Will allow for us to remove dependencies on package:devtools_server in
various packages.

Change-Id: I055cc7bb05d5b4ce0071e3f88a71cb9596e76c74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228022
Reviewed-by: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-18 22:42:05 +00:00
Danny Tuppeny
410a1fbec5 [dds] Attach file/line/col metadata to DAP OutputEvents for detected call stacks
Change-Id: Ia91f40aaf244d892d2ff5ffb0e4a1e47f8ad9068
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228040
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-18 18:26:05 +00:00
Ben Konyi
ea48265725 Reland "[ VM / Service ] Omit private fields from service responses by default"
Adds better error handling in DDS to prevent google3 breakages due to
Flutter binary update lag times.

This reverts commit 28e958febb.

TEST=N/A

Change-Id: Ida454f0ef3caeedd1b0326c37fef58d4b73557d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227620
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-01-11 23:35:28 +00:00
Danny Tuppeny
05c1af4e42 [dds] Remove breakpoints/pause-on-exception and resume when detaching from an attached process via DAP
Change-Id: I650e98fb15278d3b9685cbd0430c683f91910f09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227300
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-11 17:57:54 +00:00
Ivan Inozemtsev
28e958febb Revert "Reland "[ VM / Service ] Omit private fields from service responses by default""
This reverts commit 91a496e5db.

Reason for revert: breaks hot reloads internally

Original change's description:
> Reland "[ VM / Service ] Omit private fields from service responses by default"
>
> This reverts commit 7d39d2dd51.
>
> TEST=N/A
>
> Change-Id: I2119c841719c77be5380857ce209532ed036bd0e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226322
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I6e751343244a4788a1f080ea1aef5fdd18417109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227503
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2022-01-11 14:06:04 +00:00
Ben Konyi
9f5ef6d5bc [ DDS ] Move package:dds/vm_service_extensions.dart into package:dds_service_extensions
Reduces dependency complexity for tools which don't need the full
contents of package:dds

Change-Id: Ib9c5ce93eea72421f56114ab8a8efaa0dca6ae02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225240
Reviewed-by: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>
2022-01-10 21:11:33 +00:00