Repository navigation
Dart SDK files are not correctly mapped to local sources when debugging a Flutter app #4128
Description
Activity
- addedin flutterRelates to running Flutter appsRelates to running Flutter appsin debuggingRelates to the debug adapter or process of running debug sessionsRelates to the debug adapter or process of running debug sessions
on Aug 30, 2022 I also encountered this issue, which appeared out of nowhere, after about 2 hrs I got to #3551 from where I finally found the best thing possible was just to roll back to 3.46.1
@BlueDev5 the issue described above is not something that should be worse in 3.48 to 3.46, as SDK sources were not mapped at all in the old SDK DAPs. Could you file a new issue describing the behaviour you're seeing in v3.48 and does not occur in v3.46 so I can take a look? Thanks!
Filed issue #4147
When this is fixed, web should be tested specifically because it may behave differently (since it goes through DWDS). It currently results in this:
[+6526 ms] DevHandler: VmService proxy responded with an error: {jsonrpc: 2.0, id: 646, error: {code: -32603, message: addBreakpointWithScriptUri: Invalid argument (uri): Unknown library: "file:///Users/danny/Dev/Google/flutter/bin/cache/pkg/sky_engine/lib/core/print.dart", data: {details: #0 new DartUri._fromFileUri (package:dwds/src/utilities/dart_uri.dart:75:5) #1 new DartUri (package:dwds/src/utilities/dart_uri.dart:42:22) #2 ChromeProxyService.addBreakpointWithScriptUri (package:dwds/src/services/chrome_proxy_service.dart:355:21) <asynchronous suspension> #3 StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47) <asynchronous suspension> }}}- added a commit that references this issue
on Oct 31, 2022 Fix in progress at flutter/flutter#114369.
Unfortunately this doesn't work for Web yet because of dart-lang/webdev#606. Hopefully once that's done this will just start working without any further changes.
#3551 is fixed with the new SDK DAPs, however in Flutter apps the returned URIs aren't the same as the Dart ones, so the fix is not complete for Flutter.
I've filed dart-lang/sdk#49863 to find out whether this is a bug, and if not, exactly what the rules for the mapping are.