Skip to content

When debugging a webdev app from VS Code, hitting a breakpoint opens copy of actual file #2383

Open

Description

@elliette

It seems like when we hit a breakpoint, we are downloading a copy of the source instead of mapping it to a local source on disk. See for more details and repro steps: Dart-Code/Dart-Code#5024

Activity

  1. DanTup commented on Mar 7, 2024

    @DanTup
    Contributor

    To be clear, what's happening here is that the source has an org-dartlang-app: URI and we don't know how to map that back to the users local file system so we (the legacy debug adapter in Dart-Code) chooses to download the source from the VM.

    It's possible that lookupResolvedUris fixes this, but we only implemented that in the new DAPs (and so far have not migrated webdev to new DAPs...). I can do some testing of this and if lookupResolvedUris fixes it, we can either implement that in the legacy DAP or (ideally) make a webdev DAP in the SDK.

  2. DanTup commented on Mar 14, 2024

    @DanTup
    Contributor

    I did some testing today and confirmed that lookupResolvedPackageUris is mapping org-dartlang-app to file: URIs, so I may be able to fix this in the legacy DAPs (and if we migrate to hew SDK DAPs, that would already be implemented).

    I don't know why this only occurs here - maybe the Dart VM is probably not using org-dartlang-app URIs for things outside the lib folder? If so, making webdev match that might also be a fix - but I don't know a) if that's correct or b) if there are other implications of that (I presume there's a reason it's working like this).

  3. added
    P2A bug or feature request we're likely to work on
    on Aug 7, 2024
  4. bkonyi commented on Aug 7, 2024

    @bkonyi
    Collaborator

    How much work would this be to look into @DanTup?

  5. DanTup commented on Aug 7, 2024

    @DanTup
    Contributor

    Do you mean how much work to support look lookupResolvedPackageUris in the legacy DAP for webdev?

    We previously discussed EOLing that debug adapter because it's wildly out of date and there are almost no users of it. If we think we need to continue supporting it, I think a better route would be to create a new Dart-based DAP for it (possibly in pkg:webdev?). That would be a little more effort in the short-term, but less over a longer period because we wouldn't be developing things twice (or having inconsistent experience between Dart web and debugging other platforms).

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

    P2A bug or feature request we're likely to work onpackage:webdevtriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions