Stop passing scope for web. (#5321)

diff --git a/packages/devtools_app/lib/src/shared/console/eval/eval_service.dart b/packages/devtools_app/lib/src/shared/console/eval/eval_service.dart
index 4ad1f05..16276e4 100644
--- a/packages/devtools_app/lib/src/shared/console/eval/eval_service.dart
+++ b/packages/devtools_app/lib/src/shared/console/eval/eval_service.dart
@@ -76,11 +76,13 @@
 
     final isolateId = isolateRef.id!;
 
+    final scope = await _scopeIfSupported(isolateId);
+
     Future<Response> eval() async => await serviceManager.service!.evaluate(
           isolateId,
           (await isolate.isolate)!.rootLib!.id!,
           expressionText,
-          scope: scope.value(isolateId: isolateId),
+          scope: scope,
         );
 
     return await _evalWithVariablesRefresh(eval, isolateId);
@@ -155,17 +157,26 @@
       );
     }
 
+    final scope = await _scopeIfSupported(isolateRefId);
+
     Future<Response> evalFunction() => _service.evaluateInFrame(
           isolateRefId,
           frame.index!,
           expression,
           disableBreakpoints: true,
-          scope: scope.value(isolateId: isolateRefId),
+          scope: scope,
         );
 
     return await _evalWithVariablesRefresh(evalFunction, isolateRefId);
   }
 
+  Future<Map<String, String>?> _scopeIfSupported(String isolateRefId) async {
+    // Debugging for web does not support scopes yet.
+    if (await serviceManager.connectedApp?.isDartWebApp ?? true) return null;
+
+    return scope.value(isolateId: isolateRefId);
+  }
+
   Future<InstanceRef?> findObject(
     AdaptedHeapObject object,
     IsolateRef isolateRef,