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 --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<String> command = <String>[
_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)
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:
To trigger the crash I'm trying to debug (requires running a flutter web app)
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.