Skip to content

Dart SDK files are not correctly mapped to local sources when debugging a Flutter app #4128

Description

@DanTup

#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.

Activity

  1. added
    in flutterRelates to running Flutter apps
    in debuggingRelates to the debug adapter or process of running debug sessions
    on Aug 30, 2022
  2. added this to the v3.50.0 milestone on Aug 30, 2022
  3. BlueDev5 commented on Sep 5, 2022

    @BlueDev5

    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

  4. DanTup commented on Sep 5, 2022

    @DanTup
    MemberAuthor

    @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!

  5. BlueDev5 commented on Sep 6, 2022

    @BlueDev5

    Filed issue #4147

  6. DanTup commented on Sep 7, 2022

    @DanTup
    MemberAuthor

    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>
               }}}
    
  7. modified the milestones: v3.50.0, v3.52.0 on Oct 3, 2022
  8. DanTup commented on Oct 31, 2022

    @DanTup
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsin flutterRelates to running Flutter appsis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions