diff --git a/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart b/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart index 02f22a5026..e12f247d5a 100644 --- a/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart +++ b/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart @@ -118,14 +118,15 @@ class DartVm { /// Returns a [List] of [IsolateRef] objects whose name matches `pattern`. /// - /// Also checks to make sure it was launched from the `main()` function. + /// This is not limited to Isolates running Flutter, but to any Isolate on the + /// VM. Future> getMainIsolatesByPattern(Pattern pattern) async { final Map jsonVmRef = await invokeRpc('getVM', timeout: _kRpcTimeout); final List result = []; for (Map jsonIsolate in jsonVmRef['isolates']) { final String name = jsonIsolate['name']; - if (name.contains(pattern) && name.contains(RegExp(r':main\(\)'))) { + if (name.contains(pattern)) { result.add(IsolateRef._fromJson(jsonIsolate, this)); } }