flutter / flutter/devtools

Can't attach to debugger on Dart VM running frontend_server

オープン
#2,938 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug P3 reproduce to verify
主要言語
Dart
スター
1.7k
フォーク
404
平均マージ
6日 17時間
マージ済み PR(30日)
18

説明

I'm not sure the exact scenario required to trigger this, but attempting to connect to the VM Service of a frontend_server snapshot was sufficient to reproduce it. Debugging from the Observatory works.

To get the Observatory to print out:

```diff
diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart
index 76ba6793b8..bc681ee8c9 100644
--- a/packages/flutter_tools/lib/src/compile.dart
+++ b/packages/flutter_tools/lib/src/compile.dart
@@ -696,11 +696,13 @@ class DefaultResidentCompiler implements ResidentCompiler {
);
final List command = [
_artifacts.getHostArtifact(HostArtifact.engineDartBinary).path,
+ '--observe',
'--disable-dart-dev',
frontendServer,
'--sdk-root',
sdkRoot,
'--incremental',
+ '--verbose',
if (testCompilation)
'--no-print-incremental-dependencies',
'--target=$targetModel',
```

To trigger the crash I'm trying to debug (requires running a flutter web app)

```diff
diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart
index 0342a56138..786db092cd 100644
--- a/packages/flutter_tools/lib/src/resident_runner.dart
+++ b/packages/flutter_tools/lib/src/resident_runner.dart
@@ -116,6 +116,7 @@ class FlutterDevice {
} else {
assert(false);
}
+ extraFrontEndOptions.add('--enable-experiment=alternative-invalidation-strategy');

generator = ResidentCompiler(
globals.artifacts.getHostArtifact(HostArtifact.flutterWebSdk).path,
```

Note that it says it is paused in the debugger, but there is no debugger pane and hitting step doesn't seem to do anything.

![Dart DevTools - Google Chrome 4_25_2021 10_52_52 AM](https://user-images.githubusercontent.com/8975114/116003791-69a43e80-a5b4-11eb-9295-bef5e43e24ff.png)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。