Description
Original issue reported to IntelliJ: flutter/flutter-intellij#6159
i was able to reproduce the problem with this project: flutter/flutter-intellij#6159 (comment). The hello flutter project works for web on Windows, though, so it seems there's something different about this project. This project is fine for other platforms and targets.
Error from IntelliJ logs:
022-05-19 11:23:36,979 [ 76790] INFO - ter.vmService.VmServiceWrapper - About to add breakpoint with vm service
2022-05-19 11:23:36,980 [ 76791] INFO - ter.vmService.VmServiceWrapper - in getResolvedUri. url: file://C:/Users/helinx/Documents/mymonitor/lib/main.dart
2022-05-19 11:23:36,981 [ 76792] INFO - ter.vmService.VmServiceWrapper - Computed resolvedUri: file:///C:/Users/helinx/Documents/mymonitor/lib/main.dart
2022-05-19 11:23:36,998 [ 76809] INFO - ter.vmService.VmServiceWrapper - in received of lookupPackageUris
2022-05-19 11:23:36,998 [ 76809] INFO - ter.vmService.VmServiceWrapper - in received of lookupPackageUris. scriptUri: package:bpfmonitor/main.dart
2022-05-19 11:23:37,033 [ 76844] INFO - o.flutter.run.daemon.DaemonApi - [<-- [ +97 ms] DevHandler: VmService proxy responded with an error:]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- {jsonrpc: 2.0, id: 29, error: {code: -32603, message: addBreakpointWithScriptUri: NoSuchMethodError: The getter 'length' was called on null.]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- Receiver: null]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- Tried calling: length, data: {details: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- #1 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1703:69)]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- #2 Utf8Decoder.convert (dart:convert/utf.dart:351:42)]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- #3 Utf8Decoder.convert (package:flutter_tools/src/convert.dart:50:33)]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- #4 Codec.decode (dart:convert/codec.dart:26:34)]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- #5 WebAssetServer.sourceMapContents (package:flutter_tools/src/isolated/devfs_web.dart:593:17)]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- #6 Locations._locationsForModule.<anonymous closure> (package:dwds/src/debugging/location.dart:221:30)]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- <asynchronous suspension>]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- #7 StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- <asynchronous suspension>]
2022-05-19 11:23:37,034 [ 76845] INFO - o.flutter.run.daemon.DaemonApi - [<-- }}}]
2022-05-19 11:23:37,085 [ 76896] INFO - o.flutter.run.daemon.DaemonApi - [<-- [ +52 ms] Flutter Web Bootstrap: Auto]
This is where we make the request to the VM service: https://github.com/flutter/flutter-intellij/blob/master/flutter-idea/src/io/flutter/vmService/VmServiceWrapper.java#L612, which calls: https://github.com/flutter/flutter-intellij/blob/master/flutter-idea/third_party/vmServiceDrivers/org/dartlang/vm/service/VmService.java#L127
So in this case, the params we sent to VM service included scriptUri: package:bpfmonitor/main.dart