Skip to content

Migrate to Debugger.setBreakpointByUrl #1076

Closed

Description

@grouma

We currently set breakpoints by script ID. This has a number of drawbacks, especially around re-establishing breakpoints. There is an API to set breakpoints by URL. This API has the benefit of persisting across reloads.

Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads.

Activity

  1. natebosch commented on Jul 27, 2020

    @natebosch
    Member

    Would the URL point into the .js file or would it consider a source map? What happens if the JS code is shifted around in the reload, does that cause any issues?

  2. grouma commented on Jul 28, 2020

    @grouma
    MemberAuthor

    The URL would point to the containing module of the Dart file which would be a .js file. If the code get's shifted around we would have the same issue as Chrome does today which sets breakpoints as a per line basis.

  3. added a commit that references this issue on Aug 3, 2020
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions