Commit Graph

16 Commits

Author SHA1 Message Date
Danny Tuppeny
89ef73e068
Roll pub packages + update DAP tests (#145349)
This manually rolls pub packages and updates some calls to use updated APIs that use `Uri` instead of file paths (since macro-generated sources don't exist as files on disk).
2024-03-18 21:39:21 +00:00
Danny Tuppeny
86613d198e
[flutter_tool] [dap] Forward Flutter progress events to DAP client (#142524)
Builds can be slow and the legacy debug adapter would handle Flutter's `app.progress` events to update the toast notification during builds. This was lost in the new adapters - we should only a single "Launching.." notification for the whole progress.

This change listens to `app.progress` events and forwards those with `finished=false` to the client if the launch progress is still active.

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

https://github.com/flutter/flutter/assets/1078012/8c60cf08-e034-4a72-b31e-9c61dca388bf
2024-02-15 22:22:48 +00:00
Alexander Aprelev
3b8f6c4020
Upgrade framework pub dependencies, roll engine with rolled dart sdk (#130163)
Manual roll is needed because incoming dart sdk requires updated version
vm_snapshot_analysis (>=0.7.4).


5ae09b8b4f...7c83ea3e85

```
7c83ea3e85 Reland "Manual roll Dart SDK from 2d98d9e27dae to 0b07debd5862 (21 revisions) (#43457)" (#43472)
9ef3e8d533 Roll Skia from 5eba922297bb to 93c92f97f5ab (2 revisions) (#43471)
```

Remove implementation of SuitePlatform from the test as well. Remove use
of fake cwd from SuitePlatform as it can't be properly faked.
2023-07-07 13:55:35 -07:00
Danny Tuppeny
dc4541fa05
[flutter_tools] Add support for vmServiceFileInfo when attaching (#128503)
When building the new SDK DAPs, this functionality was missed from the Flutter adapter (but added to the Dart CLI adapter).

As well as passing a VM Service URI directly, we support passing a file that can be polled for it.

This uses the same mechanism we use to obtain the VM Service URI from a Dart debug session (we run `dart --write-service-info=foo.json my_file.dart` and then poll that file which the VM will write) and is useful for users that have their own mechanism for launching an app (for example using custom Flutter embedders - see https://github.com/Dart-Code/Dart-Code/issues/3353) to provide a VM Service URI once the app is up and running.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4577.
2023-06-16 18:00:21 +00:00
Danny Tuppeny
46007d61d2
[flutter_tools] [DAP] Don't try to restart/reload if app hasn't started yet (#128267)
The editor is set to hot-reload-on-save by default so saving while the debug session is starting currently prints an error:

Failed to Hot Reload: app 'null' not found

![image](https://github.com/flutter/flutter/assets/1078012/a125b455-a46d-4993-98d8-5d8ae7237a00)

This change skips the call to `app.restart` if the app hasn't started yet to avoid printing an error.
2023-06-09 09:41:07 +00:00
Danny Tuppeny
3494c08448
[flutter_tools/dap] Inform DAP client whether restart is supported (#121610)
[flutter_tools/dap] Inform DAP client whether restart is supported
2023-03-03 12:54:23 +00:00
Helin Shiah
46e48ba3b4
Use program during attach if provided (#118130) 2023-01-09 11:27:47 -08:00
Danny Tuppeny
9f9010f5e8
[flutter_tools] Update DAP progress when waiting for Dart Debug extension connection (#116892)
Fixes https://github.com/Dart-Code/Dart-Code/issues/4293.
2022-12-19 11:33:26 -05:00
Danny Tuppeny
a29796e339
[flutter_tools] Forward app.webLaunchUrl event from Flutter to DAP clients (#116275)
* [flutter_tools] Forward app.webLaunchUrl event from Flutter to DAP clients

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

* Update packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart

Co-authored-by: Christopher Fujino <fujino@google.com>

* Another static const instead of final

Co-authored-by: Christopher Fujino <fujino@google.com>
2022-11-30 21:25:07 +00:00
Danny Tuppeny
51c517c03c
[flutter_tools/dap] Add support for forwarding flutter run --machine exposeUrl requests to the DAP client (#114539)
* [flutter_tools/dap] Add support for forwarding `flutter run --machine` requests to the DAP client

Currently the only request that Flutter sends to the client is `app.exposeUrl` though most of this code is generic to support other requests that may be added in future.

* Improve comment

* Fix thrown strings

* StateError -> DebugAdapterException

* Add a non-null assertion and assert

* Use DebugAdapterException to handle restartRequests sent before process starts

* Fix typo + use local var

* Don't try to actually send Flutter messages in tests because there's no process
2022-11-09 19:16:47 +00:00
Danny Tuppeny
307987339e
[flutter_tools/dap] Map org-dartlang-sdk URIs to the location of the source files found by the analyzer (#114369) 2022-11-02 17:07:58 +00:00
Danny Tuppeny
676a4264aa
[dap] Don't wait for appStarted before responding to launch/attach + don't call app.stop for unstarted app (#109386) 2022-08-25 15:35:09 +00:00
Danny Tuppeny
5d31b07ed5
[flutter_tools] [dap] Ensure DAP sends app.stop/app.detach during terminate (#108310)
* [flutter_tools] [dap] Ensure DAP sends app.stop/app.detach during terminate

Fixes an issue where the flutter_tester device may not be cleaned up correctly if we just terminate the Flutter process.

* Update integration test expectations

* Revert accidental commit
2022-07-26 10:48:38 +01:00
Danny Tuppeny
78d924af1d
[flutter_tools] [dap] Add support for passing env variables to spawned processes (#107415)
* [flutter_tools] [dap] Add support for passing env variables to spawned processes

* Use named args

* Use in-memory fs and FakePlatform

* Pass filesystem style to MemoryFileSystem
2022-07-12 10:04:08 +01:00
Danny Tuppeny
801ad5cd5a
Don't terminate Dart process pids from VM Service, record flutter_tools VM pid (#100223)
* Don't terminate Dart process pids from VM Service

These processes may be on another device, and in the case of attach the debugee should not be terminated anyway.
2022-03-23 16:31:31 +00:00
Danny Tuppeny
76758ef960
[dap] Don't use --start-paused when running in Profile/Release mode (#98926) 2022-02-24 17:06:24 -08:00