Skip to content

[Debugger FR] Add option to disable breakpoints #696

Open

Description

@kenzieschmoll

It would be nice to have an option to disable breakpoints, similar to chrome devtools. I was running into this today when trying to look at another page (Memory), but I stopped being able to interact with my app because I hit a breakpoint in the debugger. In this case, being able to disable breakpoints without having to remove them would be useful.

Activity

  1. added this to the On Deck milestone on Jun 17, 2019
  2. modified the milestones: On Deck, M26 on Feb 9, 2021
  3. kenzieschmoll commented on Feb 11, 2021

    @kenzieschmoll
    MemberAuthor

    I started to look into implementing this feature and as I've gotten further into it, I think this functionality would be better at the dds layer. The workflow for disabling breakpoints would be to cache existing breakpoints, remove them as far as the vm is concerned, and then upon reactivating them, re-add the breakpoints from the cached list. If a bp is added or removed while breakpoints are deactivated, that breakpoint should be added or removed from the cached list.

    Then from devtools we could simply call service.setBreakpointsActive(false). @bkonyi @grouma thoughts?

  4. bkonyi commented on Feb 11, 2021

    @bkonyi
    Contributor

    From chat:

    Since the VM doesn't have support for disabling a single breakpoint, we'd have to remove them and add them back at a later point. This would involve creating a new ID scheme for breakpoints in DDS since the breakpoint ID would change each time it was reestablished.

    We'd need an entirely new set of breakpoint RPCs in DDS to intercept the existing ones to handle this. It's not trivial work.

  5. kenzieschmoll commented on Feb 11, 2021

    @kenzieschmoll
    MemberAuthor

    Could we add support in the VM for disabling a single breakpoint or is that out of the question?

  6. modified the milestones: M26, Backlog on Feb 11, 2021
  7. bkonyi commented on Feb 11, 2021

    @bkonyi
    Contributor

    I did some digging and it looks like we do have the ability to enable/disable breakpoints within the VM, but that functionality isn't exposed. This shouldn't be too hard to add to the protocol, but we should make sure DWDS won't have issues implementing enableBreakpoint and disableBreakpoint RPCs. cc/ @grouma

  8. grouma commented on Feb 11, 2021

    @grouma
    Contributor

    DWDS should be able to enable and disable breakpoints with minor effort. We do that for hot restarts for example.

  9. grouma commented on Mar 16, 2021

    @grouma
    Contributor

    We have been getting internal requests for this feature. We should prioritize this for Q2.

  10. bkonyi commented on Mar 16, 2021

    @bkonyi
    Contributor

    SGTM. Creating a tracking issue in the SDK for the service work: dart-lang/sdk#45336.

  11. bkonyi commented on Apr 6, 2021

    @bkonyi
    Contributor

    Support has landed in the VM service in dart-lang/sdk@2a2d83e.

  12. kenzieschmoll commented on May 26, 2023

    @kenzieschmoll
    MemberAuthor

    @elliette do you continue to see this request from internal users? Looks like the changes are in place on the VM side to use this but we never hooked it up in DevTools.

  13. added
    P1high priority issues at the top of the work list, actively being worked on.
    and removed on Jul 5, 2023
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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions