Skip to content
681 changes: 681 additions & 0 deletions dwds/lib/src/debugging/chrome_inspector.dart

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions dwds/lib/src/debugging/classes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
// BSD-style license that can be found in the LICENSE file.

import 'package:dwds/src/config/tool_configuration.dart';
import 'package:dwds/src/debugging/chrome_inspector.dart';
import 'package:dwds/src/debugging/metadata/class.dart';
import 'package:dwds/src/services/chrome_debug_exception.dart';
import 'package:dwds/src/utilities/domain.dart';
import 'package:dwds/src/utilities/shared.dart';
import 'package:vm_service/vm_service.dart';
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';

/// Keeps track of Dart classes available in the running application.
class ClassHelper extends Domain {
class ChromeAppClassHelper {
/// Map of class ID to [Class].
final _classes = <String, Class>{};

ClassHelper(AppInspectorInterface appInspector) {
inspector = appInspector;
final ChromeAppInspector inspector;

ChromeAppClassHelper(this.inspector) {
final staticClasses = [
classRefForClosure,
classRefForString,
Expand Down
4 changes: 2 additions & 2 deletions dwds/lib/src/debugging/dart_scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:dwds/src/utilities/domain.dart';
import 'package:dwds/src/debugging/chrome_inspector.dart';
import 'package:dwds/src/utilities/objects.dart';
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';

Expand Down Expand Up @@ -38,7 +38,7 @@ const ddcCapturedAsyncScope = 'capturedAsyncScope';
///
/// See chromedevtools.github.io/devtools-protocol/tot/Debugger#type-CallFrame.
Future<List<Property>> visibleVariables({
required AppInspectorInterface inspector,
required ChromeAppInspector inspector,
required WipCallFrame frame,
}) async {
final allProperties = <Property>[];
Expand Down
12 changes: 9 additions & 3 deletions dwds/lib/src/debugging/debugger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import 'dart:async';

import 'package:dwds/src/config/tool_configuration.dart';
import 'package:dwds/src/debugging/chrome_inspector.dart';
import 'package:dwds/src/debugging/dart_scope.dart';
import 'package:dwds/src/debugging/frame_computer.dart';
import 'package:dwds/src/debugging/inspector.dart';
import 'package:dwds/src/debugging/location.dart';
import 'package:dwds/src/debugging/remote_debugger.dart';
import 'package:dwds/src/debugging/skip_list.dart';
Expand Down Expand Up @@ -45,7 +47,7 @@ const _pauseModePauseStates = {
/// e.g. 'packages/myapp/main.dart.lib.js' -> '12'
final chromePathToRuntimeScriptId = <String, String>{};

class Debugger extends Domain {
class Debugger {
static final logger = Logger('Debugger');

final RemoteDebugger _remoteDebugger;
Expand All @@ -54,6 +56,8 @@ class Debugger extends Domain {
final Locations _locations;
final SkipLists _skipLists;

late ChromeAppInspector inspector;

int _frameErrorCount = 0;

final StreamController<String> parsedScriptsController =
Expand Down Expand Up @@ -107,7 +111,7 @@ class Debugger extends Domain {
// for more details.
Completer<void>? _internalPauseCompleter;

void updateInspector(AppInspectorInterface appInspector) {
void updateInspector(ChromeAppInspector appInspector) {
inspector = appInspector;
_breakpoints.inspector = appInspector;
}
Expand Down Expand Up @@ -762,7 +766,7 @@ String breakpointIdFor(String scriptId, int line, int column) =>
'bp/$scriptId#$line:$column';

/// Keeps track of the Dart and JS breakpoint Ids that correspond.
class _Breakpoints extends Domain {
class _Breakpoints {
final _logger = Logger('Breakpoints');
final _dartIdByJsId = <String, String>{};
final _jsIdByDartId = <String, String>{};
Expand All @@ -774,6 +778,8 @@ class _Breakpoints extends Domain {
final Locations locations;
final RemoteDebugger remoteDebugger;

late AppInspector inspector;

/// The root URI from which the application is served.
final String root;

Expand Down
Loading
Loading